Documentation
¶
Index ¶
- func IsMatrixExpression(e interface{}) bool
- type Expression
- type MatrixConstant
- func (mc MatrixConstant) Dims() []int
- func (mc MatrixConstant) IDs() []uint64
- func (mc MatrixConstant) Multiply(rightIn interface{}, errors ...error) (Expression, error)
- func (mc MatrixConstant) NumVars() int
- func (mc MatrixConstant) Plus(rightIn interface{}, errors ...error) (Expression, error)
- func (mc MatrixConstant) Transpose() Expression
- type MatrixExpression
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsMatrixExpression ¶
func IsMatrixExpression(e interface{}) bool
IsMatrixExpression Description:
Returns true if and only if the input object is a matrix expression.
Types ¶
type Expression ¶
type Expression interface { // NumVars returns the number of variables in the expression NumVars() int // Vars returns a slice of the Var ids in the expression IDs() []uint64 // Dims returns a slice describing the true dimensions of a given expression (scalar, vector, or matrix) Dims() []int // Plus adds the current expression to another and returns the resulting // expression Plus(e interface{}, errors ...error) (Expression, error) // Multiply multiplies the current expression to another and returns the // resulting expression Multiply(c interface{}, errors ...error) (Expression, error) }
Expression Description:
This interface should be implemented by and ScalarExpression and VectorExpression
func ToMatrixExpression ¶
func ToMatrixExpression(e interface{}) (Expression, error)
ToMatrixExpression Description:
Converts the input object into a valid type that implements the MatrixExpression interface.
type MatrixConstant ¶
MatrixConstant Description:
Represents a constant matrix.
func (MatrixConstant) Dims ¶
func (mc MatrixConstant) Dims() []int
func (MatrixConstant) IDs ¶
func (mc MatrixConstant) IDs() []uint64
IDs Description:
Returns the IDs of any variables in the expression.
func (MatrixConstant) Multiply ¶
func (mc MatrixConstant) Multiply(rightIn interface{}, errors ...error) (Expression, error)
Multiply Description:
func (MatrixConstant) NumVars ¶
func (mc MatrixConstant) NumVars() int
func (MatrixConstant) Plus ¶
func (mc MatrixConstant) Plus(rightIn interface{}, errors ...error) (Expression, error)
Plus Description:
Sums this matrix with something else.
func (MatrixConstant) Transpose ¶
func (mc MatrixConstant) Transpose() Expression
type MatrixExpression ¶
Click to show internal directories.
Click to hide internal directories.