Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wamuir/matrix-market
Go package to read and write sparse and dense matrices in the NIST MatrixMarket file format
https://github.com/wamuir/matrix-market
dense-matrices go matrix matrix-market nist sparse-matrices
Last synced: 18 days ago
JSON representation
Go package to read and write sparse and dense matrices in the NIST MatrixMarket file format
- Host: GitHub
- URL: https://github.com/wamuir/matrix-market
- Owner: wamuir
- License: mit
- Created: 2020-07-23T22:37:21.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-09-09T10:40:43.000Z (about 1 year ago)
- Last Synced: 2024-10-07T22:41:13.516Z (about 1 month ago)
- Topics: dense-matrices, go, matrix, matrix-market, nist, sparse-matrices
- Language: Go
- Homepage: https://pkg.go.dev/github.com/wamuir/matrix-market
- Size: 86.9 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# matrix-market
![Project Stability: Experimental](https://img.shields.io/badge/stability-experimental-critical.svg)
[![Go Reference](https://pkg.go.dev/badge/github.com/wamuir/matrix-market.svg)](https://pkg.go.dev/github.com/wamuir/matrix-market)
[![Build Status](https://github.com/wamuir/matrix-market/actions/workflows/go.yml/badge.svg?branch=master&event=push)](https://github.com/wamuir/matrix-market/actions/workflows/go.yml?query=event%3Apush+branch%3Amaster)
[![codecov](https://codecov.io/gh/wamuir/matrix-market/branch/master/graph/badge.svg)](https://codecov.io/gh/wamuir/matrix-market)
[![Go Report Card](https://goreportcard.com/badge/github.com/wamuir/matrix-market)](https://goreportcard.com/report/github.com/wamuir/matrix-market)# Installation
```sh
go get -u github.com/wamuir/matrix-market
```# Usage
```go
var m market.COOfile, 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](https://pkg.go.dev/github.com/wamuir/matrix-market#COO) | [sparse.COO](https://pkg.go.dev/github.com/james-bowman/sparse#COO) |
| Matrix | Coordinate | Real | Skew-Symmetric | [market.COO](https://pkg.go.dev/github.com/wamuir/matrix-market#COO) | [sparse.COO](https://pkg.go.dev/github.com/james-bowman/sparse#COO) |
| Matrix | Coordinate | Real | Symmetric | [market.COO](https://pkg.go.dev/github.com/wamuir/matrix-market#COO) | [sparse.COO](https://pkg.go.dev/github.com/james-bowman/sparse#COO) |#### Sparse Integer-Valued Matrices
| Object | Format | Field | Symmetry | Concrete Type | Storage |
| ------ | ---------- | ------- | -------------- | :------------------------------------------------------------------------: | :-----------------------------------------------------------------------: |
| Matrix | Coordinate | Integer | General | [market.COO](https://pkg.go.dev/github.com/wamuir/matrix-market#COO) | [sparse.COO](https://pkg.go.dev/github.com/james-bowman/sparse#COO) |
| Matrix | Coordinate | Integer | Skew-Symmetric | [market.COO](https://pkg.go.dev/github.com/wamuir/matrix-market#COO) | [sparse.COO](https://pkg.go.dev/github.com/james-bowman/sparse#COO) |
| Matrix | Coordinate | Integer | Symmetric | [market.COO](https://pkg.go.dev/github.com/wamuir/matrix-market#COO) | [sparse.COO](https://pkg.go.dev/github.com/james-bowman/sparse#COO) |#### Sparse Complex-Valued Matrices
| Object | Format | Field | Symmetry | Concrete Type | Storage |
| ------ | ---------- | ------- | -------------- | :------------------------------------------------------------------------: | :-----------------------------------------------------------------------: |
| Matrix | Coordinate | Complex | General | [market.CDense](https://pkg.go.dev/github.com/wamuir/matrix-market#CDense) | [mat.CDense](https://pkg.go.dev/gonum.org/v1/gonum/mat#CDense) |
| Matrix | Coordinate | Complex | Hermitian | [market.CDense](https://pkg.go.dev/github.com/wamuir/matrix-market#CDense) | [mat.CDense](https://pkg.go.dev/gonum.org/v1/gonum/mat#CDense) |
| Matrix | Coordinate | Complex | Skew-Symmetric | [market.CDense](https://pkg.go.dev/github.com/wamuir/matrix-market#CDense) | [mat.CDense](https://pkg.go.dev/gonum.org/v1/gonum/mat#CDense) |
| Matrix | Coordinate | Complex | Symmetric | [market.CDense](https://pkg.go.dev/github.com/wamuir/matrix-market#CDense) | [mat.CDense](https://pkg.go.dev/gonum.org/v1/gonum/mat#CDense) |#### Sparse Pattern Matrices
| Object | Format | Field | Symmetry | Concrete Type | Storage |
| ------ | ---------- | ------- | -------------- | :------------------------------------------------------------------------: | :-----------------------------------------------------------------------: |
| Matrix | Coordinate | Pattern | General | [market.COO](https://pkg.go.dev/github.com/wamuir/matrix-market#COO) | [sparse.COO](https://pkg.go.dev/github.com/james-bowman/sparse#COO) |
| Matrix | Coordinate | Pattern | Symmetric | [market.COO](https://pkg.go.dev/github.com/wamuir/matrix-market#COO) | [sparse.COO](https://pkg.go.dev/github.com/james-bowman/sparse#COO) |## Dense Matrices (Array Format)
#### Dense Real-Valued Matrices
| Object | Format | Field | Symmetry | Concrete Type | Storage |
| ------ | ---------- | ------- | -------------- | :------------------------------------------------------------------------: | :-----------------------------------------------------------------------: |
| Matrix | Array | Real | General | [market.Dense](https://pkg.go.dev/github.com/wamuir/matrix-market#Dense) | [mat.Dense](https://pkg.go.dev/gonum.org/v1/gonum/mat#Dense) |
| Matrix | Array | Real | Skew-Symmetric | [market.Dense](https://pkg.go.dev/github.com/wamuir/matrix-market#Dense) | [mat.Dense](https://pkg.go.dev/gonum.org/v1/gonum/mat#Dense) |
| Matrix | Array | Real | Symmetric | [market.Dense](https://pkg.go.dev/github.com/wamuir/matrix-market#Dense) | [mat.Dense](https://pkg.go.dev/gonum.org/v1/gonum/mat#Dense) |#### Dense Integer-Valued Matrices
| Object | Format | Field | Symmetry | Concrete Type | Storage |
| ------ | ---------- | ------- | -------------- | :------------------------------------------------------------------------: | :-----------------------------------------------------------------------: |
| Matrix | Array | Integer | General | [market.Dense](https://pkg.go.dev/github.com/wamuir/matrix-market#Dense) | [mat.Dense](https://pkg.go.dev/gonum.org/v1/gonum/mat#Dense) |
| Matrix | Array | Integer | Skew-Symmetric | [market.Dense](https://pkg.go.dev/github.com/wamuir/matrix-market#Dense) | [mat.Dense](https://pkg.go.dev/gonum.org/v1/gonum/mat#Dense) |
| Matrix | Array | Integer | Symmetric | [market.Dense](https://pkg.go.dev/github.com/wamuir/matrix-market#Dense) | [mat.Dense](https://pkg.go.dev/gonum.org/v1/gonum/mat#Dense) |#### Dense Complex-Valued Matrices
| Object | Format | Field | Symmetry | Concrete Type | Storage |
| ------ | ---------- | ------- | -------------- | :------------------------------------------------------------------------: | :-----------------------------------------------------------------------: |
| Matrix | Array | Complex | General | [market.CDense](https://pkg.go.dev/github.com/wamuir/matrix-market#CDense) | [mat.CDense](https://pkg.go.dev/gonum.org/v1/gonum/mat#CDense) |
| Matrix | Array | Complex | Hermitian | [market.CDense](https://pkg.go.dev/github.com/wamuir/matrix-market#CDense) | [mat.CDense](https://pkg.go.dev/gonum.org/v1/gonum/mat#CDense) |
| Matrix | Array | Complex | Skew-Symmetric | [market.CDense](https://pkg.go.dev/github.com/wamuir/matrix-market#CDense) | [mat.CDense](https://pkg.go.dev/gonum.org/v1/gonum/mat#CDense) |
| Matrix | Array | Complex | Symmetric | [market.CDense](https://pkg.go.dev/github.com/wamuir/matrix-market#CDense) | [mat.CDense](https://pkg.go.dev/gonum.org/v1/gonum/mat#CDense) |