Skip to content

ontanj/generic-matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generic Matrix

This library provides basic matrix operations for matrices with elements from any space.

Space

The library is built around the interface space. It defines the element-wise operations needed for the matrix operations to work. Two examples are implemented in bigint.go and damgard-jurik.go where the operations are defined for *big.Int from the standard library, and the additive homomorphic cryptosystem described by Damgård and Jurik and implemented in tcpaillier.

Usage

The library is in the package genmatrix. Import it by import github.com/ontanj/generic-matrix and use it as genmatrix.NewMatrix(...).

Matrix structure

The matrices are defined as

type Matrix struct {
    values []interface{}
    Rows, Cols int
    Space space
}

where values are stored in row-major order and space stores the evaluation space for the matrix.

About

Basic operations for matrices with elements from any space

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages