Mat_d (struct)

The Mat_d represents a dense matrix.

/*
** Example: Mat_d
*/

// create a 4 row, 3 column matrix
Mat_d mat(4, 3);

Mat_d Mat_d Mat_d

Members

Integer rows  
Float64[] vals  

Methods

  Mat_d ( in Integer rows, in Integer cols )
  Mat_d ( in Mat_d that )
  Mat_d ()
Boolean almostEqual ? ( in Mat_d that )
Boolean almostEqual ? ( in Mat_d that, in Float64 precision )
  appendDesc ? ( io String string )
Mat_d clone ? ()
Integer cols ? ()
Boolean equal ? ( in Mat_d that )
Float64 get ? ( in Integer row, in Integer col )
UInt32 hash ? ()
Mat_d linearInterpolate ? ( in Mat_d that, in Float64 t )
  resize ! ( in Integer rows, in Integer cols )
Integer rows ? ()
  set ! ( in Integer row, in Integer col, in Float64 val )
  setAll ! ( in Float64 val )
  setDiagonal ! ( in Integer size, in Float64 val )
  setDiagonal ! ( in Vec_d vec )
  setIdentity ! ( in Integer size )
  setNull ! ()
String sizeDesc ? ()
Mat_d sub ? ( in Integer rs, in Integer re, in Integer cs, in Integer ce )
Mat_d topLeft ? ( in Integer rows, in Integer cols )
Float64 trace ? ()
Mat_d transpose ? ()

Operators

  - Mat_d
Mat_d = ( Param other )

Methods in detail

Mat_d ( in Integer rows, in Integer cols )

Construct a matrix with rows and cols dimensions


Mat_d ( in Mat_d that )

Construct a matrix from the matrix that


Mat_d ()

default constructor


Boolean Mat_d.almostEqual? ( in Mat_d that )

Returns true if this matrix is almost the same as another one (using a default precision)


Boolean Mat_d.almostEqual? ( in Mat_d that, in Float64 precision )

Returns true if this matrix is almost the same as another one


Mat_d.appendDesc? ( io String string )

Append a String description of this matrix and its element values to the io String string


Mat_d Mat_d.clone? ()

clone method


Integer Mat_d.cols? ()


Boolean Mat_d.equal? ( in Mat_d that )

Returns true if this matrix is the same as another one


Float64 Mat_d.get? ( in Integer row, in Integer col )

Return the element value at row and col


UInt32 Mat_d.hash? ()

Hash for this matrix


Mat_d Mat_d.linearInterpolate? ( in Mat_d that, in Float64 t )

Linearly interpolates this matrix with another one based on a scalar blend value (0.0 to 1.0)


Mat_d.resize! ( in Integer rows, in Integer cols )

Resize the matrix to rows and cols dimensions


Integer Mat_d.rows? ()


Mat_d.set! ( in Integer row, in Integer col, in Float64 val )

Set the element value at row and col


Mat_d.setAll! ( in Float64 val )

Set all the matrix element values to val


Mat_d.setDiagonal! ( in Integer size, in Float64 val )

setting the diagonal components of this matrix to a scalar


Mat_d.setDiagonal! ( in Vec_d vec )

Set to a diagonal matrix given the diagonal elements


Mat_d.setIdentity! ( in Integer size )

Set the matrix to an identity matrix of size rows and cols


Mat_d.setNull! ()

Set the values of all matrix elements to zero


String Mat_d.sizeDesc? ()

Return a String description of this matrix and its dimensions


Mat_d Mat_d.sub? ( in Integer rs, in Integer re, in Integer cs, in Integer ce )


Mat_d Mat_d.topLeft? ( in Integer rows, in Integer cols )


Float64 Mat_d.trace? ()

Compute the trace of the matrix. The matrix must be square.


Mat_d Mat_d.transpose? ()

Operators in detail

unary -


Mat_d = ( Param other )

Add another matrix in place