Skip to content

Go package to read and write sparse and dense matrices in the NIST MatrixMarket file format

License

Notifications You must be signed in to change notification settings

wamuir/matrix-market

Repository files navigation

matrix-market

Project Stability: Experimental Go Reference Build Status codecov Go Report Card

Installation

  go get -u github.com/wamuir/matrix-market

Usage

  var m market.COO

  file, err := os.Open("sparse.mtx")
  if err != nil {
      log.Fatal(err)
  }
  defer file.Close()

  _, err := m.UnmarshalTextFrom(file)
  if err != nil {
      log.Fatal(err)
  }

  var c *sparse.COO = m.ToCOO()  // github.com/james-bowman/sparse

Supported Formats

Sparse Matrices (Coordinate Format)

Sparse Real-Valued Matrices

Object Format Field Symmetry Concrete Type Storage
Matrix Coordinate Real General market.COO sparse.COO
Matrix Coordinate Real Skew-Symmetric market.COO sparse.COO
Matrix Coordinate Real Symmetric market.COO sparse.COO

Sparse Integer-Valued Matrices

Object Format Field Symmetry Concrete Type Storage
Matrix Coordinate Integer General market.COO sparse.COO
Matrix Coordinate Integer Skew-Symmetric market.COO sparse.COO
Matrix Coordinate Integer Symmetric market.COO sparse.COO

Sparse Complex-Valued Matrices

Object Format Field Symmetry Concrete Type Storage
Matrix Coordinate Complex General market.CDense mat.CDense
Matrix Coordinate Complex Hermitian market.CDense mat.CDense
Matrix Coordinate Complex Skew-Symmetric market.CDense mat.CDense
Matrix Coordinate Complex Symmetric market.CDense mat.CDense

Sparse Pattern Matrices

Object Format Field Symmetry Concrete Type Storage
Matrix Coordinate Pattern General market.COO sparse.COO
Matrix Coordinate Pattern Symmetric market.COO sparse.COO

Dense Matrices (Array Format)

Dense Real-Valued Matrices

Object Format Field Symmetry Concrete Type Storage
Matrix Array Real General market.Dense mat.Dense
Matrix Array Real Skew-Symmetric market.Dense mat.Dense
Matrix Array Real Symmetric market.Dense mat.Dense

Dense Integer-Valued Matrices

Object Format Field Symmetry Concrete Type Storage
Matrix Array Integer General market.Dense mat.Dense
Matrix Array Integer Skew-Symmetric market.Dense mat.Dense
Matrix Array Integer Symmetric market.Dense mat.Dense

Dense Complex-Valued Matrices

Object Format Field Symmetry Concrete Type Storage
Matrix Array Complex General market.CDense mat.CDense
Matrix Array Complex Hermitian market.CDense mat.CDense
Matrix Array Complex Skew-Symmetric market.CDense mat.CDense
Matrix Array Complex Symmetric market.CDense mat.CDense

About

Go package to read and write sparse and dense matrices in the NIST MatrixMarket file format

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages