nerdamer/structures
Matrices, vectors, sets, collections, dictionaries, and related operations.
nerdamer/structures. For the functions you write inside nerdamer('...'), see the function reference.Functions
append(x: ParserEntity, value: ParserEntity): ParserEntityFunctionReturns a new vector with value added as its last element. The vector itself isn't changed. A symbolic first argument keeps the call, so it can be evaluated once the vector is known.
cross(a: Vector, b: Vector): VectorFunctionComputes the cross product of two vectors in 0, 1, 3, or 7 dimensions. The three-dimensional result is the familiar cross product; the seven-dimensional result follows the fixed octonion convention documented on Vector.cross. The 7D multiplication table is not uniquely determined by dimension alone. Zero- and one-dimensional results are zero vectors. Other dimensions are unsupported. Two symbolic Expressions are instead left as an unevaluated cross(a, b) call, because their dimensions are not known.
determinant(M: Matrix): ExpressionFunctionComputes the determinant without mutating the supplied Matrix.
difference(a: ParserEntity, b: ParserEntity): ParserEntityFunctionReturns the set of values in the first set but not in the second.
dot(a: ParserEntity, b: ParserEntity): ExpressionFunctionComputes the dot product of two Vectors or preserves two symbolic operands.
imatrix(x: Expression): Expression | MatrixFunctionCreates an identity matrix of integer size.
intersection(...sets: ParserEntity[]): ParserEntityFunctionReturns the set of values in every one of the given sets.
intersects(a: ParserEntity, b: ParserEntity): ParserEntityFunctionReturns 1 when the two sets have a value in common and 0 when they don't.
invert(M: Matrix): MatrixFunctionReturns the inverse without modifying the supplied Matrix.
isSubset(a: ParserEntity, b: ParserEntity): ParserEntityFunctionReturns 1 when every value of the first set is in the second and 0 otherwise.
nullspace(M: Matrix, prime?: string | number | Expression): VectorFunctionReturns the nullspace basis as a Vector of basis vectors.
union(...sets: ParserEntity[]): ParserEntityFunctionReturns the set of values in any of the given sets.
Classes
CollectionClassAn ordered heterogeneous collection of parser entities.
DictionaryClassA key-value container where keys are strings (variable names) and values are any ParserEntity. Supports element-wise arithmetic operations.
MatrixClassA rectangular two-dimensional matrix of scalar Expression elements.
ValuesSetClassA finite mathematical set of Nerdamer parser values.
VectorClassAn ordered, operable parser aggregate with heterogeneous ParserEntity elements.
