From 5fc375a6a99e49293117cf417d488784b2de26f2 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 9 Jul 2019 18:18:01 -0700 Subject: [PATCH] Updated docs --- docs/Apatite.html | 741 +----- docs/Apatite/LinearAlgebra.html | 70 +- .../LinearAlgebra/ErrDimensionMismatch.html | 233 ++ docs/Apatite/LinearAlgebra/ErrNotRegular.html | 233 ++ .../LinearAlgebra/ErrOperationNotDefined.html | 262 +++ docs/Apatite/LinearAlgebra/Error.html | 236 ++ docs/Apatite/LinearAlgebra/Matrix.html | 2096 ++++++++++++++--- docs/Apatite/LinearAlgebra/NDArray.html | 83 +- docs/Apatite/LinearAlgebra/Vector.html | 1751 ++------------ .../LinearAlgebra/ZeroVectorError.html | 233 ++ docs/Apatite/Matrix.html | 220 ++ .../Matrix/EigenvalueDecomposition.html | 254 ++ docs/Apatite/Matrix/LupDecomposition.html | 254 ++ docs/Array.html | 59 +- docs/index.html | 49 +- docs/index.json | 2 +- docs/search-index.js | 2 +- 17 files changed, 4220 insertions(+), 2558 deletions(-) create mode 100644 docs/Apatite/LinearAlgebra/ErrDimensionMismatch.html create mode 100644 docs/Apatite/LinearAlgebra/ErrNotRegular.html create mode 100644 docs/Apatite/LinearAlgebra/ErrOperationNotDefined.html create mode 100644 docs/Apatite/LinearAlgebra/Error.html create mode 100644 docs/Apatite/LinearAlgebra/ZeroVectorError.html create mode 100644 docs/Apatite/Matrix.html create mode 100644 docs/Apatite/Matrix/EigenvalueDecomposition.html create mode 100644 docs/Apatite/Matrix/LupDecomposition.html diff --git a/docs/Apatite.html b/docs/Apatite.html index ce70818..69283e1 100644 --- a/docs/Apatite.html +++ b/docs/Apatite.html @@ -46,7 +46,27 @@ + + + + +
  • + Matrix + + @@ -131,28 +176,42 @@ of Crystal.

    Defined in:

    - - apatite/linear_algebra/ndarray.cr + + apatite/linear_algebra/error.cr
    - + + apatite/linear_algebra/matrix/eigenvalue_decomposition.cr + + +
    + + + + apatite/linear_algebra/matrix/lup_decomposition.cr + + +
    + + + apatite/linear_algebra.cr
    - + apatite.cr
    - + apatite/version.cr @@ -166,39 +225,6 @@ of Crystal.

    -
    - I = Vector::I -
    - -
    -

    Cartesian unit vector I

    - -

    Vector{1.0, 0.0, 0.0}

    -
    - - -
    - J = Vector::J -
    - -
    -

    Cartesian unit vector J

    - -

    Vector{0.0, 1.0, 0.0}

    -
    - - -
    - K = Vector::K -
    - -
    -

    Cartesian unit vector K

    - -

    Vector{0.0, 0.0, 1.0}

    -
    - -
    VERSION = "0.1.0"
    @@ -210,186 +236,9 @@ of Crystal.

    -

    Class Method Summary

    - -

    Instance Method Summary

    -
      - -
    • - #angle_from(a, b) - -

      Returns the angle between this vector and another in radians.

      - -
    • - -
    • - #antiparallel_to?(a, b) - -

      Returns whether the vectors are antiparallel to each other.

      - -
    • - -
    • - #as_vector(input : Indexable) - -

      Creates a new vector from the given input.

      - -
    • - -
    • - #basis(size, index) - -

      Creates a standard basis-n vector of the given size and index.

      - -
    • - -
    • - #cosine(x, y) - -

      Compute the cosine distance between two vectors.

      - -
    • - -
    • - #diagonal(values) - -

      Creates a matrix where the diagonal elements are composed of values.

      - -
    • - -
    • - #dot(x, y) - -

      Get the scalar (dot) product of two vectors.

      - -
    • - -
    • - #empty - -

      Returns a new empty Vector

      - -
    • - -
    • - #empty_matrix(row_count = 0, column_count = 0) - -

      Creates a new empty matrix with the given row_count and column_count.

      - -
    • - -
    • - #eye(n) - -

      Creates a new diagonal matrix of size n with ones in the diagonal and zeros elsewhere.

      - -
    • - -
    • - #full(n, i) - -

      Returns a new vector of size n filled with i

      - -
    • - -
    • - #identity(n) - -

      Creates a n x n identity matrix.

      - -
    • - -
    • - #ones(n) - -

      Returns a new vector filled with n ones.

      - -
    • - -
    • - #parallel_to?(a, b) - -

      Returns whether the vectors are parallel to each other.

      - -
    • - -
    • - #perpendicular_to?(a, b) - -

      Returns whether the vectors are perpendicular to each other.

      - -
    • - -
    • - #random(n, range = nil) - -

      Creates a new vector of size n filled with random numbers.

      - -
    • - -
    • - #row_vector(row) - -

      Creates a single-row matrix where the values of that row are as given in row.

      - -
    • - -
    • - #scalar(n, value) - -

      Creates an n by n diagonal matrix where each diagonal element is value.

      - -
    • - -
    • - #similarity(x, y) - -

      Compute the cosine similarity of two vectors.

      - -
    • - -
    • - #vector(n, &block) - -

      Creates a new vector of size n, and invokes the block once for each index of self, assigning the block's value in that index.

      - -
    • - -
    • - #zeros(n) - -

      Returns a new vector filled with n zeros.

      - -
    • - -
    - - @@ -424,465 +273,7 @@ of Crystal.

    -

    Class Method Detail

    - -
    -
    - - def self.approx_precision - # -
    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def self.approx_precision=(approx_precision) - - # -
    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def self.precision - - # -
    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def self.precision=(precision) - - # -
    - -
    -
    - - [View source] - -
    -
    - - - - -

    Instance Method Detail

    - -
    -
    - - def angle_from(a, b) - - # -
    - -

    Returns the angle between this vector and another in radians. -If the vectors are mirrored across their axes this will return nil.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def antiparallel_to?(a, b) - - # -
    - -

    Returns whether the vectors are antiparallel to each other.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def as_vector(input : Indexable) - - # -
    - -

    Creates a new vector from the given input. Input can be any -Indexable type.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def basis(size, index) - - # -
    - -

    Creates a standard basis-n vector of the given size and index.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def cosine(x, y) - - # -
    - -

    Compute the cosine distance between two vectors.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def diagonal(values) - - # -
    - -

    Creates a matrix where the diagonal elements are composed of values.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def dot(x, y) - - # -
    - -

    Get the scalar (dot) product of two vectors.

    - -

    [https://en.wikipedia.org/wiki/Scalar_product](https://en.wikipedia.org/wiki/Scalar_product

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def empty - - # -
    - -

    Returns a new empty Vector

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def empty_matrix(row_count = 0, column_count = 0) - - # -
    - -

    Creates a new empty matrix with the given row_count and -column_count. At lease one of row_count or -column_count must be zero.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def eye(n) - - # -
    - -

    Creates a new diagonal matrix of size n with ones in the diagonal -and zeros elsewhere.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def full(n, i) - - # -
    - -

    Returns a new vector of size n filled with i

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def identity(n) - - # -
    - -

    Creates a n x n identity matrix.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def ones(n) - - # -
    - -

    Returns a new vector filled with n ones.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def parallel_to?(a, b) - - # -
    - -

    Returns whether the vectors are parallel to each other.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def perpendicular_to?(a, b) - - # -
    - -

    Returns whether the vectors are perpendicular to each other.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def random(n, range = nil) - - # -
    - -

    Creates a new vector of size n filled with random numbers. A range -can optionally be passed in if you want to limit the random numbers -to a given range.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def row_vector(row) - - # -
    - -

    Creates a single-row matrix where the values of that row are as given in row.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def scalar(n, value) - - # -
    - -

    Creates an n by n diagonal matrix where each diagonal element is value.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def similarity(x, y) - - # -
    - -

    Compute the cosine similarity of two vectors.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def vector(n, &block) - - # -
    - -

    Creates a new vector of size n, and invokes the block once -for each index of self, assigning the block's value in that index.

    - -
    -
    - - [View source] - -
    -
    - -
    -
    - - def zeros(n) - - # -
    - -

    Returns a new vector filled with n zeros.

    - -
    -
    - - [View source] - -
    -
    - diff --git a/docs/Apatite/LinearAlgebra.html b/docs/Apatite/LinearAlgebra.html index fe97a44..ba033f1 100644 --- a/docs/Apatite/LinearAlgebra.html +++ b/docs/Apatite/LinearAlgebra.html @@ -46,7 +46,27 @@ + + +
  • + +
  • + Matrix + + @@ -123,33 +168,40 @@

    Defined in:

    - - apatite/linear_algebra/ndarray.cr + + apatite/linear_algebra/error.cr
    - + apatite/linear_algebra/vector.cr
    - + apatite/linear_algebra/matrix.cr
    - + apatite/linear_algebra.cr
    + + + apatite/linear_algebra/ndarray.cr + + +
    + @@ -210,7 +262,7 @@
    - [View source] + [View source]
    @@ -230,7 +282,7 @@
    - [View source] + [View source]
    diff --git a/docs/Apatite/LinearAlgebra/ErrDimensionMismatch.html b/docs/Apatite/LinearAlgebra/ErrDimensionMismatch.html new file mode 100644 index 0000000..1d1373e --- /dev/null +++ b/docs/Apatite/LinearAlgebra/ErrDimensionMismatch.html @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + Apatite::LinearAlgebra::ErrDimensionMismatch - github.com/watzon/apatite + + + + + + +
    +

    + + class Apatite::LinearAlgebra::ErrDimensionMismatch + +

    + + + + + + + + + + + + + + + + + + + + +

    Defined in:

    + + + + apatite/linear_algebra/error.cr + + +
    + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    + + + diff --git a/docs/Apatite/LinearAlgebra/ErrNotRegular.html b/docs/Apatite/LinearAlgebra/ErrNotRegular.html new file mode 100644 index 0000000..5ce322e --- /dev/null +++ b/docs/Apatite/LinearAlgebra/ErrNotRegular.html @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + Apatite::LinearAlgebra::ErrNotRegular - github.com/watzon/apatite + + + + + + +
    +

    + + class Apatite::LinearAlgebra::ErrNotRegular + +

    + + + + + + + + + + + + + + + + + + + + +

    Defined in:

    + + + + apatite/linear_algebra/error.cr + + +
    + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    + + + diff --git a/docs/Apatite/LinearAlgebra/ErrOperationNotDefined.html b/docs/Apatite/LinearAlgebra/ErrOperationNotDefined.html new file mode 100644 index 0000000..7df16c2 --- /dev/null +++ b/docs/Apatite/LinearAlgebra/ErrOperationNotDefined.html @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + Apatite::LinearAlgebra::ErrOperationNotDefined - github.com/watzon/apatite + + + + + + +
    +

    + + class Apatite::LinearAlgebra::ErrOperationNotDefined + +

    + + + + + + + + + + + + + + + + + + + + +

    Defined in:

    + + + + apatite/linear_algebra/error.cr + + +
    + + + + + + +

    Constructors

    + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +

    Constructor Detail

    + +
    +
    + + def self.new(method, this, other) + + # +
    + +
    +
    + + [View source] + +
    +
    + + + + + + + + + +
    + + + diff --git a/docs/Apatite/LinearAlgebra/Error.html b/docs/Apatite/LinearAlgebra/Error.html new file mode 100644 index 0000000..9fa7cd5 --- /dev/null +++ b/docs/Apatite/LinearAlgebra/Error.html @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + Apatite::LinearAlgebra::Error - github.com/watzon/apatite + + + + + + +
    +

    + + class Apatite::LinearAlgebra::Error + +

    + + + + + + + + + + + + + + + +

    Direct Known Subclasses

    + + + + + + + +

    Defined in:

    + + + + apatite/linear_algebra/error.cr + + +
    + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + +
    + + + diff --git a/docs/Apatite/LinearAlgebra/Matrix.html b/docs/Apatite/LinearAlgebra/Matrix.html index f5d1a29..7f87e08 100644 --- a/docs/Apatite/LinearAlgebra/Matrix.html +++ b/docs/Apatite/LinearAlgebra/Matrix.html @@ -14,7 +14,7 @@ - Apatite::LinearAlgebra::Matrix - github.com/watzon/apatite + Apatite::LinearAlgebra::Matrix(T) - github.com/watzon/apatite @@ -46,7 +46,27 @@ + + +
  • + +
  • + Matrix + + @@ -85,12 +130,12 @@

    - class Apatite::LinearAlgebra::Matrix + class Apatite::LinearAlgebra::Matrix(T)

    - + @@ -102,11 +147,11 @@

    Included Modules

    @@ -122,7 +167,7 @@

    Defined in:

    - + apatite/linear_algebra/matrix.cr @@ -131,17 +176,19 @@ + +

    Constant Summary

    + +
    + +
    + SELECTORS = {all: true, diagonal: true, off_diagonal: true, lower: true, strict_lower: true, strict_upper: true, upper: true} +
    + + +
    -

    Constructors

    - @@ -156,93 +203,98 @@
  • - .build(row_count, column_count = row_count, &block) + .build(row_count, column_count = row_count, &block : Int32, Int32 -> T) -

    Creates a matrix of size row_count x column_count.

    +

    Creates a matrix of size +row_count+ x +column_count+.

  • - .col_vector(column) + .column_vector(column) -

    Creates a single-column matrix where the values of that column are as given in column.

    +

    Creates a single-column matrix where the values of that column are as given in #column.

  • .columns(columns) -

    Creates a matrix using .columns as an array of column vectors.

    +

    Creates a matrix using +columns+ as an array of column vectors.

  • - .diagonal(values) + .combine(*matrices, &block) + +

    Create a matrix by combining matrices entrywise, using the given block

    + +
  • + +
  • + .diagonal(values : Indexable(T), dummy = nil)

    Creates a matrix where the diagonal elements are composed of values.

  • - .diagonal(*values) - -

    Creates a matrix where the diagonal elements are composed of values.

    + .diagonal(*values : T)
  • .empty(row_count = 0, column_count = 0) -

    Creates a empty matrix of row_count x column_count.

    - -
  • - -
  • - .eye(n) - -

    Creates a new diagonal matrix of size n with ones in the diagonal and zeros elsewhere.

    +

    Creates a empty matrix of #row_count x #column_count.

  • .hstack(x, *matrices) -

    TODO

    +

    Create a matrix by stacking matrices horizontally

  • .identity(n) -

    Creates a n x n identity matrix.

    +

    Creates an n by n identity matrix.

  • .row_vector(row) -

    Creates a single-row matrix where the values of that row are as given in #row.

    +

    Creates a single-row matrix where the values of that row are as given in #row.

  • - .rows(rows) + .rows(rows : Indexable(Array(T)), copy = true) -

    Creates a matrix where rows is an array of arrays, each of which is a row of the matrix.

    +

    Creates a matrix where +rows+ is an array of arrays, each of which is a row of the matrix.

  • - .scalar(n, value) + .scalar(n, value : T) -

    Creates an n by n diagonal matrix where each diagonal element is value.

    +

    Creates an +n+ by +n+ diagonal matrix where each diagonal element is value.

  • - .vstack(x, y) + .unit(n : T) -

    TODO

    +

    Creates an n by n identity matrix.

    + +
  • + +
  • + .vstack(x, *matrices) + +

    Create a matrix by stacking matrices vertically

  • @@ -261,71 +313,79 @@