# [−][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. On some platforms at least. Which leads me into my next point:

Aljabar is not very safe. In the attempt to make things as generic and minimalist in implementation as possible, a lot of unsafe blocks are used. When it is possible to specialize and make more safe implementations, that is done instead.

The performance of Aljabar is currently probably pretty bad. I have yet to test it, but let's just say I haven't gotten very far on the matrix multiplication page on wikipedia.

## Structs

 Matrix An `N`-by-`M` Column Major matrix. Vector N-element vector.

## Traits

 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 Types that have an exact square root. RealInnerSpace Defines an InnerSpace where the Scalar is a real number. Automatically implemented. RealMetricSpace A metric spaced where the metric is a real number. 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

 mat1x1 Returns, uh, a 1-by-1 square matrix. mat2x2 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. mat3x3 Returns a 3-by-3 square matrix. mat4x4 Returns a 4-by-4 square matrix. vec1 vec2 vec3 vec4

## 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. 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.