symbolic

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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

type MatrixConstant mat.Dense

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

type MatrixExpression interface {
	Dims() []int // Computes the dimensions of the input matrix

	// IDs
	// Returns the ids of any variables in the matrix expression
	IDs() []uint64

	NumVars() int // Returns the number of variables in the matrix expression
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL