[][src]Crate aljabar

The super generic super experimental linear algebra library.

This library serves the dual purpose of being an experimental API for future rust linear algebra libraries as well as a test of rustc's strength in compiling a number of in development features, such as const generics and specialization.

It is not the specific goal of this project to be useful in any sense, but hopefully it will end up being roughly compatible with cgmath.

Aljabar has no benchmarks and cannot make any performance guarantees at the moment.

Macros

matrix

Construct a matrix of any size. The matrix is specified in row-major order, but this function converts it to aljabar's native column-major order.

point

Construct a new Point of any size.

vector

Construct a new vector of any size.

Structs

Euler

A representation of a rotation in three dimensional space. Each component is the rotation around its respective axis in radians.

Matrix

An N-by-M Column Major matrix.

Orthonormal

A Matrix that forms an orthonormal basis. Commonly known as a rotation matrix.

Point

A point in space.

Quaternion

A Quaternion, composed of a scalar and a Vector3.

Vector

N-element vector.

Traits

Angle

A value for which the usual set of trigonometric functions are defined.

InnerSpace

Vector spaces that have an inner (also known as "dot") product.

MetricSpace

A type with a distance function between two values.

One

Defines the multiplicative identity element for Self.

Real

Values that are Real numbers.

RealInnerSpace

Defines an InnerSpace where the Scalar is a real number. Automatically implemented.

RealMetricSpace

A metric spaced where the metric is a real number.

Rotation

A type that can rotate a Vector of a given dimension.

SquareMatrix

Defines a matrix with an equal number of elements in either dimension.

VectorSpace

Vectors that can be added together and multiplied by scalars form a VectorSpace.

Zero

Defines the additive identity for Self.

Functions

mat1x1Deprecated

Returns a 1-by-1 square matrix.

mat2x2Deprecated

Returns a 2-by-2 square matrix. Although matrices are stored column wise, the order of arguments is row by row, as a matrix would be typically displayed.

mat3x3Deprecated

Returns a 3-by-3 square matrix.

mat4x4Deprecated

Returns a 4-by-4 square matrix.

new_matrix

Constructs a new matrix from an array, using the more visually natural row major order. Necessary to help the compiler. Prefer calling the macro matrix!, which calls new_matrix internally.

new_point

Constructs a new point from an array. Necessary to help the compiler. Prefer calling the macro point!, which calls new_point internally.

new_vector

Constructs a new vector from an array. Necessary to help the compiler. Prefer calling the macro vector!, which calls new_vector internally.

vec1Deprecated
vec2Deprecated
vec3Deprecated
vec4Deprecated

Type Definitions

Mat1x1

A 1-by-1 square matrix.

Mat2x2

A 2-by-2 square matrix.

Mat3x3

A 3-by-3 square matrix.

Mat4x4

A 4-by-4 square matrix.

Point1

A point in 1-dimensional space.

Point2

A point in 2-dimensional space.

Point3

A point in 3-dimensional space.

Point4

A point in 4-dimensional space.

Point5

A point in 5-dimensional space.

TruncatedVector

A Vector with one fewer dimension than N.

Vector1

1-element vector.

Vector2

2-element vector.

Vector3

3-element vector.

Vector4

4-element vector.

Vector5

5-element vector.