#linear-algebra #optimization #ipopt #nlp #sparse

pounce-linalg

Linear algebra primitives for POUNCE (port of Ipopt's src/LinAlg): BLAS-1, Vector and Matrix abstractions, dense vectors/matrices, compound vectors/matrices, expansion and scaling matrices, triplet storage, triplet→CSC conversion

3 releases (breaking)

new 0.4.0 Jun 6, 2026
0.3.0 Jun 2, 2026
0.2.0 May 25, 2026

#1 in #linear-algebra

27 downloads per month
Used in 15 crates (8 directly)

EPL-2.0 license

290KB
7K SLoC

pounce-linalg

Linear algebra primitives for POUNCE. Port of Ipopt's src/LinAlg/.

Internal crate. Like upstream, POUNCE uses an object-oriented vector / matrix layer over concrete dense and structured types, so the algorithm-side code can talk to compound iterates without knowing the underlying storage.

What's in it

  • TraitsVector, Matrix, SymMatrix: the abstract surface every concrete type implements (IpVector.hpp, IpMatrix.hpp, IpSymMatrix.hpp).
  • DenseDenseVector, DenseGenMatrix, DenseSymMatrix with companion *Space factories.
  • CompoundCompoundVector, CompoundMatrix, CompoundSymMatrix: block-structured iterates, used heavily by the IPM (x, s, λ, ν, z_L, z_U live in a single CompoundVector).
  • StructuredDiagMatrix, ExpansionMatrix, IdentityMatrix, ZeroMatrix, SumMatrix, ScaledMatrix, TransposeMatrix, LowRankUpdateSymMatrix, MultiVectorMatrix.
  • Sparse tripletsGenTMatrix, SymTMatrix (COO storage), TripletToCsrConverter for handing matrices to sparse linear solvers.
  • BLAS-1blas1 module with hand-rolled inner loops; no system BLAS dependency.

Why an OO layer?

The IPM never instantiates a raw 𝐱 ∈ ℝⁿ — it operates on a compound iterate with substructure that downstream operators (e.g. the augmented KKT system, line-search expansion, scaling) need to know about. The Vector / Matrix traits, with VectorCache / MatrixCache keyed on the upstream Tag machinery (see pounce-common), let strategies operate on iterates without touching storage details.

License

EPL-2.0.

Dependencies

~0–1.6MB
~30K SLoC