compute method

  1. @override
Vector compute(
  1. Vector v
)
override

Computes the values of the function using the content of v as parameters

Implementation

@override
Vector compute(Vector v) {
  return ((parameters.mapRows((row) => (row - v).pow(2)))
              .reduceColumns((combine, vector) => combine + vector)
              .sqrt() -
          distances)
      .pow(2);
}