feat: Implement Vector type #28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "vector"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Vector type is simply a generic type for built-in JavaScript Arrays. The parameter type is the type of all of the entries of the Array. The Vector type also supports inhomogeneous arrays by using the special type
Unknown
as the argument type, but note that when computing with inhomogeneous arrays, method dispatch must be performed separately for every entry in a calculation, making all operations considerably slower than on homogeneous Vector instances.Note also that arithmetic operations on nested Vectors, e.g.
Vector(Vector(NumberT))
are defined so as to interpret such entities as ordinary matrices, represented in row-major format (i.e., the componentVector(NumberT)
items of such an entity are the rows of the matrix.