Skip to content

HeRCLab/hercm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HeRC Matrix Tools (HeRCM)

Update 2017-11-21

This project is no longer active. I will accept bug reports and may fix them, but no new features will be added in the forseeable future.

Introduction

HeRC Matrix Tools is a collection of open source sparse and symmetric matrix tools, originally created for the University of South Carolina HeRC research group.

HeRC Matrix Tools encompasses a number of tools and libraries to make working with symmetric matrices easier, enumerated below.

Documentation

Some special purpose documentation is kept in doc-extra in markdown format. All other documentation is generated by Doxygen. Doxygen output is not tracked in git, but compiled copies of said documentation are included with project releases.

Documentation may be built manually with doxygen Doxyfile in the TLD of the project.

NOTE: documentation for C components of the project are not listed in the "class browser" - you must use the "Files" tab, then select the file you wish to view documentation for.

Features

Current

Python 3.X

  • read/write access to the file formats:
  • mtx
  • bxf
  • valcol
  • mat
  • matrix operations
  • conversion of matrix to/from scipy.sparse and numpy dense matrix formats
  • append (COO) element
  • retrieve (COO) element by index
  • retrieve indicies which match a COO element
  • remove COO element by index
  • retrieve matrix values by (row, col) coordinate pair
  • modify matrix values by (row, col) coordinate pair
  • remove elements from the matrix whose value is zero
  • replace matrix contents with a scipy.sparse matrix
  • check if any elements are stored in the upper/lower triangle of the matrix
  • check if the matrix is symmetric
  • convert the matrix to symmetric/asymmetric
  • sort matrix elements to row-major
  • transpose the matrix
  • HercExplorer interface
  • wrappers for all of the above
  • paint values by (row, col) pair, in a rectangle pattern, or a diagonal pattern
  • retrieve values by (row, col) pair, in a rectangular region, by row, or by col
  • display graphical (via matplotlib) and pseudo-graphical overviews of the matrix
  • modify matrix dimensions

C

  • read matrices stored in BXF format

BXF

  • store symmetric and asymmetric matrices in COO format
  • store comments about matrix in REMARKS field

Planned

Python 3.X

  • read/write support for harwell-boeing format
  • read/write support for serialized python objects
  • matrix computation operations (eg. computing matrix eigenvector)

C

  • read matricies stored in valcol format
  • read+write support for BXF and valcol
  • matrix transpose operation
  • COO-to-CSR and CSR-to-COO operations
  • sort matrix elements to row major

BXF

  • error checking

Major Libraries & their Purposes

Herc Explorer

Wraps most libraries and functionalities provided by the hercm project within a command line interface. Includes the ability to read and write matrices in a variety of formats, preview or plot matrices, and perform a variety of operations on them.

src/python33/HercExplorer.py

libHercmIO

Aggregate IO library for hercm python code, wraps code to read and write matrices in all formats support by hercm python code.

src/python33/libHercmIO.py

bxfio

C BXF library. Currently supports read only access to BXF matrix files in C.

src/c/bxfio.c

libBXF

Provides read/write access to bxf format files.

src/python33/libBXF.py

libValcolIO

Provides read/write access to valcol format files.

src/python33/libValcolIO.py

libHercMatrix

Provides a feature rich class type for sparse matrices, and includes scipy/numpy interoperability.

src/python33/libHercMatrix.py

matrixUtils

Provides user-interface centric utilities pertaining to sparse matrices, generally used almost exclusively by MatrixExplorer, but is provided as a separate library to facilitate automation by other scripts and programs.

src/python33/MatrixUtils.py