Module: Colt::MatrixFloatingAlgebra

Included in:
DoubleMDMatrix1D, DoubleMDMatrix2D, FloatMDMatrix1D, FloatMDMatrix2D
Defined in:
lib/colt/matrix/algebra.rb

Instance Method Summary collapse

Instance Method Details

#kron(matrix) ⇒ Object


Computes the Kronecker product of two real matrices.




131
132
133
134
# File 'lib/colt/matrix/algebra.rb', line 131

def kron(matrix)
  result = @colt_algebra.kron(@colt_matrix, matrix.colt_matrix)
  MDMatrix.from_colt_matrix(result)
end

#norm1Object


Returns the one-norm of vector x, which is Sum(abs(x)).




140
141
142
# File 'lib/colt/matrix/algebra.rb', line 140

def norm1
  @colt_algebra.norm1(@colt_matrix)
end

#norm2Object


Returns the two-norm of matrix A, which is the maximum singular value; obtained from SVD.




149
150
151
# File 'lib/colt/matrix/algebra.rb', line 149

def norm2
  @colt_algebra.norm2(@colt_matrix)
end

#norm_infinityObject


Returns the infinity norm of matrix A, which is the maximum absolute row sum.




165
166
167
# File 'lib/colt/matrix/algebra.rb', line 165

def norm_infinity
  @colt_algebra.normInfinity(@colt_matrix)
end

#normFObject


Returns the Frobenius norm of matrix A, which is Sqrt(Sum(A^2))




157
158
159
# File 'lib/colt/matrix/algebra.rb', line 157

def normF
  @colt_algebra.normF(@colt_matrix)
end