Austra.Library 2.0.6

dotnet add package Austra.Library --version 2.0.6
NuGet\Install-Package Austra.Library -Version 2.0.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Austra.Library" Version="2.0.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Austra.Library --version 2.0.6
#r "nuget: Austra.Library, 2.0.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Austra.Library as a Cake Addin
#addin nuget:?package=Austra.Library&version=2.0.6

// Install Austra.Library as a Cake Tool
#tool nuget:?package=Austra.Library&version=2.0.6

Austra.Library

Austra.Library is a library for .NET Core 7 that provides classes for linear algebra, statistics, time series and transforms. All classes are totally implemented using managed code, but implementations are optimized by using low-level C# features such as pointers and hardware intrinsics.

The online Austra help covers both the library and the language, and is available here.

Linear Algebra

Austra provides classes for dense vectors and matrices, for double-precision arithmetic. It also features an efficient ComplexVector class. Single-precision floats, complex and sparse matrices are planned for a future sprint. All operations takes advantage of C# operators when possible, so most of the operations are non-destructive.

There are three classes for representing matrices:

  • Matrix is the general class that you will use most of the time.
  • Lower triangular matrices are represented by the LMatrix class.
  • Upper triangular matrices are represented by the RMatrix class.

The point with this two additional classes is not to save space, since the underlying data structure is the same, but to provide a more efficient implementation of several methods and operators. There's also some logical advantages, regarding type safety, since some decompositions returns triangular matrices.

As usual, matrix multiplication has been fully optimized using loop reordering and unrolling, blocking and hardware intrinsics, including fused multiply and add. There are variants for multiplying a matrix by another matrix transposed on-the-fly, for multiplying a vector by a transposed matrix and for accelerating linear combinations of vectors.

Matrix Decompositions

Austra provides classes for the following matrix decompositions:

  • Lower-Upper (LU) Decomposition
  • Cholesky Decomposition
  • Eigenvalues Decomposition (EVD)

Matrix.Solve(Vector) and Matrix.Solve(Matrix) uses LU decomposition internally.

Time series

The kernel of Austra was our implementation of the Mean-Variance optimizer. This means that time series were implemented before vectors and matrices.

Series are collections of pairs date/value, and they are sorted by date. Values can be used as vectors, but there are some differences. Vector operations check, at run time, that the operands have the same length. The same behavior would be hard to enforce for series. On one hand, each series can have a different first available date. On the other hand, even series with the same frequency could have reported values at different days of the week or the month, and still, it could be interesting to mix them.

So, the rules for mixing two series in an operation are:

  • They must have the same frequency, and their frequencies are checked at runtime.
  • However, they may have different lengths. If this is the case, the shorter length is chosen for the result.
  • The points of the series are aligned according to their most recent points.
  • The list of dates assigned to the result series is chosen arbitrarily from the first operand.

Polynomials and root finding

The Polynomials static class provides methods for polynomial evaluation and root finding. The Solver class implements a simple variant of the Newton-Raphson method for root finding.

There's also a PolyEval for evaluating polynomials using the Horner's method, and a PolySolve for analytically finding roots whenever possible, and using eigenvalues of the Frobenius matrix in the general case. There's even a PolyDerivative for computing the derivative of a polynomial.

Natural cubic splines has also been implemented, both for series and for functions, using a grid. You can even calculate the derivative of a spline at any point in the supported range.

Fast Fourier Transform

Austra implements a pretty decent FFT algorithm, compared to most popular managed implementations. It uses the Cooley-Tukey algorithm, and it's optimized for small sizes. Small primes are handled either with Bluestein's or Rader's algorithm, depending on the size.

In any case, there is still room for improvement, and it's planned to be optimized in the future. AVX prefers structs of arrays over arrays of structures, and this preference obviously applies to complex arithmetic: it's more efficient to represent the real and the imaginary parts of a list of complex numbers in separate arrays.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Austra.Library:

Package Downloads
Austra.Parser

Implements a compiler for the AUSTRA's formula language.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.6 106 2/8/2024
2.0.5 153 12/25/2023

Supports sequences in the formula language.