You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 840075a
Browse filesBrowse the repository at this point in the historyBrowse files
Make dot and cross nodes that apply to a name for a vector (#2455)
dot(a, b) and cross(a, b) of a name threw InvalidArgumentParseException at
parse time, so a vector could not be substituted later. They are now the nodes
DotProductf and CrossProductf, computed once both operands are vectors, by
substitution, InnerSimplified, Evaled and a compiled delegate over double[],
double[,] or Complex[] (dot to a scalar, cross to a column). Vectors written out
are still computed when parsed and print as before.
Errors follow det: a number, a statement, a set, a written matrix that is not a
vector, or a written vector that cannot fit (cross(a, [1, 2])) is refused at
parse time; operands that turn out not to fit after substitution leave the node
unevaluated; a compiled delegate throws InvalidMatrixOperationException at the
call, or at Compile where the shapes are written out.
cross is not commutative: a product with an unevaluated cross in it is kept in
its order, as one with a transpose is, and nothing reorders its operands. A name
beside a written vector, dot(x * [1, 2], [3, 4]), is left as a node, as det
leaves det(x * [[1, 2], [3, 4]]); it was multiplied in as a number. Recorded in
BREAKING-CHANGES.md. MatrixFunctionsInAnExpressionTest's dot(A, [1, 2]) row
moved from refused to parsed, since that is the change.
Part of #105
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
$"cross of two vectors is the vector product in three dimensions, and these have {VectorComponents(left)!.Length} and {VectorComponents(right)!.Length} components");
160
176
}
161
177
162
178
/// <summary><c>resultant(p, q, x)</c>, eliminating <c>x</c> between two polynomials.</summary>
0 commit comments