Liking cljdoc? Tell your friends :D

fastmath.interpolation.common


(binary-search arr v)

binary-search-idclj

(binary-search-id bsres n)

Find array index after binary search snapping to the lower value. The last segment snaps to the previous segment.

Find array index after binary search snapping to the lower value. The last segment snaps to the previous segment.
raw docstring

check-axis!clj

(check-axis! method
             axis
             arr
             {:keys [min-points sorted?] :or {min-points 1 sorted? true}})

Checks the coordinates of one axis of an interpolator and throws ex-info when they are invalid.

Parameters:

  • method (keyword): name of the interpolation method, used in the message
  • axis (keyword): name of the axis, for example :xs
  • arr (double array): the coordinates
  • opts (map, optional keys):
    • :min-points (long, default: 1): minimal number of points
    • :sorted? (boolean, default: true): require strictly increasing coordinates

Every coordinate has to be finite (not NaN, not infinite), also when :sorted? is false.

Returns nil. Throws ex-info with :property set to :too-few-points, :not-finite or :not-increasing.

See also validate-xy!, invalid-input!.

Checks the coordinates of one axis of an interpolator and throws `ex-info` when they are invalid.

Parameters:

- `method` (keyword): name of the interpolation method, used in the message
- `axis` (keyword): name of the axis, for example `:xs`
- `arr` (double array): the coordinates
- `opts` (map, optional keys):
    - `:min-points` (long, default: 1): minimal number of points
    - `:sorted?` (boolean, default: true): require strictly increasing coordinates

Every coordinate has to be finite (not `NaN`, not infinite), also when `:sorted?` is false.

Returns `nil`. Throws `ex-info` with `:property` set to `:too-few-points`, `:not-finite` or `:not-increasing`.

See also [[validate-xy!]], [[invalid-input!]].
raw docstring

invalid-input!clj

(invalid-input! method property message data)

Throws ex-info describing invalid input data of an interpolation method.

Parameters:

  • method (keyword): name of the interpolation method, used in the message
  • property (keyword): the violated property, for example :length-mismatch, :too-few-points, :not-finite or :not-increasing
  • message (string): description of the problem
  • data (map): additional data stored in the exception

Never returns. The ex-data of the exception contains :type (:invalid-input), :method, :property and the keys of data.

See also check-axis!, validate-xy!.

Throws `ex-info` describing invalid input data of an interpolation method.

Parameters:

- `method` (keyword): name of the interpolation method, used in the message
- `property` (keyword): the violated property, for example `:length-mismatch`, `:too-few-points`, `:not-finite` or `:not-increasing`
- `message` (string): description of the problem
- `data` (map): additional data stored in the exception

Never returns. The `ex-data` of the exception contains `:type` (`:invalid-input`), `:method`, `:property` and the keys of `data`.

See also [[check-axis!]], [[validate-xy!]].
raw docstring

pi-matrix-ysclj

(pi-matrix-ys xss Phi ys polynomial-terms)

Adds polynomial terms

Adds polynomial terms
raw docstring

solve-LU-or-SVDclj

(solve-LU-or-SVD A b)

Solves the linear system A x = b with LU decomposition, falls back to SVD (minimum norm least squares) when the matrix is singular.

Parameters:

  • A (RealMatrix): square matrix
  • b (RealVector): right hand side

Returns the solution as a vector of doubles.

Solves the linear system `A x = b` with LU decomposition, falls back to SVD (minimum norm least squares) when the matrix is singular.

Parameters:

- `A` (`RealMatrix`): square matrix
- `b` (`RealVector`): right hand side

Returns the solution as a vector of doubles.
raw docstring

validate-xy!clj

(validate-xy! method xs ys opts)

Checks the data of a one dimensional interpolator and throws ex-info when it is invalid.

Parameters:

  • method (keyword): name of the interpolation method, used in the message
  • xs (double array): the nodes
  • ys (double array): the values; NaN and infinite values are allowed
  • opts (map, optional keys): :min-points (default: 1) and :sorted? (default: true), see check-axis!

The number of values has to be equal to the number of nodes.

Returns nil. Throws ex-info with :property set to :length-mismatch, :too-few-points, :not-finite or :not-increasing.

See also check-axis!, invalid-input!.

Checks the data of a one dimensional interpolator and throws `ex-info` when it is invalid.

Parameters:

- `method` (keyword): name of the interpolation method, used in the message
- `xs` (double array): the nodes
- `ys` (double array): the values; `NaN` and infinite values are allowed
- `opts` (map, optional keys): `:min-points` (default: 1) and `:sorted?` (default: true), see [[check-axis!]]

The number of values has to be equal to the number of nodes.

Returns `nil`. Throws `ex-info` with `:property` set to `:length-mismatch`, `:too-few-points`, `:not-finite` or `:not-increasing`.

See also [[check-axis!]], [[invalid-input!]].
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close