Documentation
¶
Index ¶
- func CheckDimensionsInAddition(left, right MatrixLike) error
- func CheckDimensionsInComparison(arg1, arg2 MatrixLike, comparisonType string) error
- func CheckDimensionsInHStack(sliceToStack ...MatrixLike) error
- func CheckDimensionsInMultiplication(left, right MatrixLike) error
- func CheckDimensionsInSubtraction(left, right MatrixLike) error
- func CheckDimensionsInVStack(sliceToStack ...MatrixLike) error
- func CheckIndexOnMatrix(rowIndex int, colIndex int, matrix MatrixLike) error
- func CheckIndexOnVector(index int, vector MatrixLike) error
- func IsScalarExpression(e MatrixLike) bool
- type CanNotGetLinearCoeffOfConstantError
- type EmptyLinearCoeffsError
- type EmptyMatrixError
- type EmptyVectorError
- type EqualityConstraintRequiredError
- type InequalityConstraintRequiredError
- type InvalidMatrixIndexError
- type InvalidVectorIndexError
- type LinearExpressionRequiredError
- type MatrixColumnMismatchError
- type MatrixDimensionError
- type MatrixLike
- type NegativeExponentError
- type UnsupportedInputError
- type VectorDimensionError
- type VectorLike
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDimensionsInAddition ¶
func CheckDimensionsInAddition(left, right MatrixLike) error
func CheckDimensionsInComparison ¶ added in v0.2.0
func CheckDimensionsInComparison(arg1, arg2 MatrixLike, comparisonType string) error
func CheckDimensionsInHStack ¶ added in v0.1.7
func CheckDimensionsInHStack(sliceToStack ...MatrixLike) error
CheckDimensionsInHStack Description:
This function checks that the dimensions of the left and right expressions are compatible for horizontal stacking. We allow: - Stacking if the number of rows match
func CheckDimensionsInMultiplication ¶
func CheckDimensionsInMultiplication(left, right MatrixLike) error
CheckDimensionsInMultiplication Description:
This function checks that the dimensions of the left and right expressions are compatible for multiplication. We allow: - Multiplication if Dimensions Match OR - Multiplication if one of the expressions is a scalar
func CheckDimensionsInSubtraction ¶ added in v0.1.5
func CheckDimensionsInSubtraction(left, right MatrixLike) error
CheckDimensionsInSubtraction Description:
This function checks that the dimensions of the left and right expressions
func CheckDimensionsInVStack ¶ added in v0.1.7
func CheckDimensionsInVStack(sliceToStack ...MatrixLike) error
CheckDimensionsInVStack Description:
This function checks that the dimensions of the left and right expressions are compatible for vertical stacking. We allow: - Stacking if the number of columns match
func CheckIndexOnMatrix ¶
func CheckIndexOnMatrix(rowIndex int, colIndex int, matrix MatrixLike) error
CheckIndexOnMatrix Description:
Checks that the index is valid for the matrix.
func CheckIndexOnVector ¶
func CheckIndexOnVector(index int, vector MatrixLike) error
Explicit Functions
func IsScalarExpression ¶
func IsScalarExpression(e MatrixLike) bool
IsScalarExpression Description:
Determines whether or not an input object is a valid "ScalarExpression" according to Dims().
Types ¶
type CanNotGetLinearCoeffOfConstantError ¶
type CanNotGetLinearCoeffOfConstantError struct {
Expression interface{}
}
func (CanNotGetLinearCoeffOfConstantError) Error ¶
func (lce CanNotGetLinearCoeffOfConstantError) Error() string
type EmptyLinearCoeffsError ¶ added in v0.1.1
type EmptyLinearCoeffsError struct {
Expression interface{}
}
Type
func (EmptyLinearCoeffsError) Error ¶ added in v0.1.1
func (elce EmptyLinearCoeffsError) Error() string
Error Function
type EqualityConstraintRequiredError ¶ added in v0.2.0
type EqualityConstraintRequiredError struct {
Operation string
}
func (EqualityConstraintRequiredError) Error ¶ added in v0.2.0
func (e EqualityConstraintRequiredError) Error() string
type InequalityConstraintRequiredError ¶ added in v0.2.0
type InequalityConstraintRequiredError struct {
Operation string
}
func (InequalityConstraintRequiredError) Error ¶ added in v0.2.0
func (icre InequalityConstraintRequiredError) Error() string
type InvalidMatrixIndexError ¶
type InvalidMatrixIndexError struct { RowIndex int ColIndex int Expression MatrixLike }
func (InvalidMatrixIndexError) Error ¶
func (imi InvalidMatrixIndexError) Error() string
type InvalidVectorIndexError ¶
type InvalidVectorIndexError struct { Index int Expression MatrixLike }
func (InvalidVectorIndexError) Error ¶
func (ivi InvalidVectorIndexError) Error() string
type LinearExpressionRequiredError ¶ added in v0.2.0
type LinearExpressionRequiredError struct { Operation string Expression interface{} }
func (LinearExpressionRequiredError) Error ¶ added in v0.2.0
func (lere LinearExpressionRequiredError) Error() string
type MatrixColumnMismatchError ¶
func (MatrixColumnMismatchError) Error ¶
func (mcme MatrixColumnMismatchError) Error() string
type MatrixDimensionError ¶ added in v0.2.0
type MatrixDimensionError struct { Arg1 MatrixLike Arg2 MatrixLike Operation string // Either multiply or Plus }
MatrixDimensionError Description:
This error is thrown when two matrices do not have the appropriate dimensions for a given operation.
func (MatrixDimensionError) ArgDimsAsStrings ¶ added in v0.2.0
func (de MatrixDimensionError) ArgDimsAsStrings() []string
func (MatrixDimensionError) Error ¶ added in v0.2.0
func (de MatrixDimensionError) Error() string
type MatrixLike ¶
type MatrixLike interface {
Dims() []int
}
type NegativeExponentError ¶ added in v0.1.6
type NegativeExponentError struct {
Exponent int
}
Type Definition
func (NegativeExponentError) Error ¶ added in v0.1.6
func (e NegativeExponentError) Error() string
Error
type UnsupportedInputError ¶
type UnsupportedInputError struct { FunctionName string Input interface{} }
Error Definition
func (UnsupportedInputError) Error ¶
func (uie UnsupportedInputError) Error() string
type VectorDimensionError ¶ added in v0.2.0
type VectorDimensionError struct { Arg1 VectorLike Arg2 VectorLike Operation string }
VectorDimensionError Description:
This error is thrown when two matrices do not have the appropriate dimensions for a given operation.
func (VectorDimensionError) Error ¶ added in v0.2.0
func (de VectorDimensionError) Error() string
type VectorLike ¶ added in v0.2.0
VectorLike Description:
An interface for all objects that can be treated as vectors.
Source Files
¶
- empty_linear_coeffs.go
- empty_matrix.go
- empty_vector.go
- equality_constraint_required.go
- inequality_constraint_required.go
- linear_coeffs.go
- linear_expression_required.go
- matrix_column_mismatch.go
- matrix_dimension_error.go
- matrix_like.go
- negative_exponent.go
- out_of_bounds_error.go
- unsupported_input.go
- vector_dimension_error.go
- vector_like.go
Click to show internal directories.
Click to hide internal directories.