diff --git a/docs/Apatite.html b/docs/Apatite.html index abb9af7..86b9301 100644 --- a/docs/Apatite.html +++ b/docs/Apatite.html @@ -131,28 +131,28 @@ of Crystal.

Defined in:

- + apatite/linear_algebra/ndarray.cr
- + apatite/linear_algebra.cr
- + apatite.cr
- + apatite/version.cr @@ -172,6 +172,8 @@ of Crystal.

Cartesian unit vector I

+ +

Vector{1.0, 0.0, 0.0}

@@ -181,6 +183,8 @@ of Crystal.

Cartesian unit vector J

+ +

Vector{0.0, 1.0, 0.0}

@@ -190,6 +194,8 @@ of Crystal.

Cartesian unit vector K

+ +

Vector{0.0, 0.0, 1.0}

@@ -204,31 +210,6 @@ of Crystal.

-

Class Method Summary

- -

Instance Method Summary

@@ -244,7 +225,14 @@ of Crystal.

  • #basis(size, index) -

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

    +

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

    + +
  • + +
  • + #diagonal(values) + +

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

  • @@ -255,6 +243,20 @@ of Crystal.

    +
  • + #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) @@ -262,6 +264,13 @@ of Crystal.

  • +
  • + #identity(n) + +

    Creates a n x n identity matrix.

    + +
  • +
  • #ones(n) @@ -269,6 +278,27 @@ of Crystal.

  • +
  • + #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.

    + +
  • +
  • #vector(n, &block) @@ -320,73 +350,6 @@ 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

    @@ -405,7 +368,7 @@ of Crystal.


    - [View source] + [View source]
    @@ -418,12 +381,30 @@ of Crystal.

    # -

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

    +

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


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

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

    + +
    +
    + + [View source]
    @@ -441,7 +422,46 @@ of Crystal.


    - [View source] + [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]
    @@ -459,7 +479,25 @@ of Crystal.


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

    Creates a n x n identity matrix.

    + +
    +
    + + [View source]
    @@ -477,7 +515,63 @@ of Crystal.


    - [View source] + [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]
    @@ -496,7 +590,7 @@ for each index of self, assigning the block's value in that index.<
    - [View source] + [View source]
    @@ -514,7 +608,7 @@ for each index of self, assigning the block's value in that index.<
    - [View source] + [View source]
    diff --git a/docs/Apatite/LinearAlgebra.html b/docs/Apatite/LinearAlgebra.html index b8dfceb..c110d3b 100644 --- a/docs/Apatite/LinearAlgebra.html +++ b/docs/Apatite/LinearAlgebra.html @@ -123,28 +123,28 @@

    Defined in:

    - + apatite/linear_algebra/ndarray.cr
    - + apatite/linear_algebra/vector.cr
    - + apatite/linear_algebra/matrix.cr
    - + apatite/linear_algebra.cr @@ -203,14 +203,14 @@

    Calculates the sigmoid curve for a numeric input.

    -

    f(x) = 1/(1 + e^-x)

    +

    f(x) = 1/(1 + e^-x)

    -

    See also: Sigmoid function [WikiWand

    +

    See also: Sigmoid function (WikiWand)


    - [View source] + [View source]
    @@ -225,12 +225,12 @@

    Calculates the derivative sigmoid curve for a numeric input.

    -

    f'(x) = f(x)(1 - f(x)),

    +

    f'(x) = f(x)(1 - f(x)),


    - [View source] + [View source]
    diff --git a/docs/Apatite/LinearAlgebra/Matrix.html b/docs/Apatite/LinearAlgebra/Matrix.html index 0effd28..037e4a4 100644 --- a/docs/Apatite/LinearAlgebra/Matrix.html +++ b/docs/Apatite/LinearAlgebra/Matrix.html @@ -122,7 +122,7 @@

    Defined in:

    - + apatite/linear_algebra/matrix.cr @@ -137,7 +137,7 @@