Documentation ¶
Index ¶
- type Elem
- type Elem32
- type Elem64
- type IoRandSource
- type Matrix
- func Gaussian[T Elem](src IoRandSource, rows, cols uint64) *Matrix[T]
- func Mul[T Elem](a *Matrix[T], b *Matrix[T]) *Matrix[T]
- func MulSeededLeft[T Elem](a *MatrixSeeded[T], b *Matrix[T]) *Matrix[T]
- func MulVec[T Elem](a *Matrix[T], b *Matrix[T]) *Matrix[T]
- func MulVecPacked[T Elem](a *Matrix[T], b *Matrix[T]) *Matrix[T]
- func New[T Elem](rows uint64, cols uint64) *Matrix[T]
- func Rand[T Elem](src IoRandSource, rows uint64, cols uint64, mod uint64) *Matrix[T]
- func Ternary[T Elem](src IoRandSource, rows uint64, cols uint64) *Matrix[T]
- func Zeros[T Elem](rows uint64, cols uint64) *Matrix[T]
- func (a *Matrix[T]) Add(b *Matrix[T])
- func (a *Matrix[T]) AddAt(i, j uint64, val T)
- func (a *Matrix[T]) AddConst(val T)
- func (a *Matrix[T]) AddWithMismatch(b *Matrix[T])
- func (m *Matrix[T]) AppendZeros(n uint64)
- func (m *Matrix[T]) CanSquish(pMod uint64) bool
- func (m *Matrix[T]) Cols() uint64
- func (a *Matrix[T]) Concat(b *Matrix[T])
- func (m *Matrix[T]) Copy() *Matrix[T]
- func (m *Matrix[T]) Data() []T
- func (m *Matrix[T]) DropLastrows(n uint64)
- func (m *Matrix[T]) Equals(n *Matrix[T]) bool
- func (m *Matrix[T]) Get(i, j uint64) T
- func (m *Matrix[T]) GetRow(offset, num_rows uint64) *Matrix[T]
- func (m *Matrix[T]) GobDecode(buf []byte) error
- func (m Matrix[T]) GobEncode() ([]byte, error)
- func (m *Matrix[T]) Make32() *Matrix[Elem32]
- func (m *Matrix[T]) Make64() *Matrix[Elem64]
- func (a *Matrix[T]) ModConst(val T)
- func (a *Matrix[T]) MulConst(val T)
- func (m *Matrix[T]) Print()
- func (m *Matrix[T]) PrintStart()
- func (m *Matrix[T]) ReadFromFile(fn string) error
- func (m *Matrix[T]) ReadFromFileDescriptor(f *os.File) error
- func (m *Matrix[T]) ReduceMod(p uint64)
- func (m *Matrix[T]) Round(round_to uint64, mod uint64)
- func (m *Matrix[T]) Rows() uint64
- func (m *Matrix[T]) RowsDeepCopy(offset, num_rows uint64) *Matrix[T]
- func (m *Matrix[T]) Set(i, j uint64, val T)
- func (m *Matrix[T]) ShiftDown(n int)
- func (m *Matrix[T]) Size() uint64
- func (m *Matrix[T]) Squish()
- func (m *Matrix[T]) SquishBasis() uint64
- func (m *Matrix[T]) SquishRatio() uint64
- func (a *Matrix[T]) Sub(b *Matrix[T])
- func (a *Matrix[T]) SubConst(val T)
- func (m *Matrix[T]) WriteToFile(fn string) error
- func (m *Matrix[T]) WriteToFileDescriptor(f *os.File) error
- type MatrixSeeded
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Matrix ¶
type Matrix[T Elem] struct { // contains filtered or unexported fields }
func MulSeededLeft ¶
func MulSeededLeft[T Elem](a *MatrixSeeded[T], b *Matrix[T]) *Matrix[T]
func Ternary ¶
func Ternary[T Elem](src IoRandSource, rows uint64, cols uint64) *Matrix[T]
Elements in range [0, 1, 2]
func (*Matrix[T]) AddWithMismatch ¶
func (*Matrix[T]) AppendZeros ¶
func (*Matrix[T]) DropLastrows ¶
func (*Matrix[T]) PrintStart ¶
func (m *Matrix[T]) PrintStart()
func (*Matrix[T]) ReadFromFile ¶
func (*Matrix[T]) ReadFromFileDescriptor ¶
func (*Matrix[T]) RowsDeepCopy ¶
func (*Matrix[T]) Squish ¶
func (m *Matrix[T]) Squish()
Compresses the matrix to store it in 'packed' form. Specifically, this method squishes the matrix by representing each group of 'delta' consecutive values as a single database Element, where each value uses 'basis' bits.
func (*Matrix[T]) SquishBasis ¶
func (*Matrix[T]) SquishRatio ¶
func (*Matrix[T]) WriteToFile ¶
type MatrixSeeded ¶
type MatrixSeeded[T Elem] struct { // contains filtered or unexported fields }
func NewSeeded ¶
func NewSeeded[T Elem](src []IoRandSource, rows []uint64, cols uint64) *MatrixSeeded[T]
Click to show internal directories.
Click to hide internal directories.