Previous Page Next Page Contents

Dom::SparseMatrixF2 -- the domain of sparse matrices over the field with two elements

Introduction

Dom::SparseMatrixF2 represents the set of all matrices over the finite field with two elements.

Domain

Dom::SparseMatrixF2()

Details

Introduction

Dom::SparseMatrixF2(m, n, [s1, ..., sm]) creates the m times n matrix (aij) such that, for each i, the set of all j with aij=1 equals the set (or list) si.

Creating Elements

Dom::SparseMatrixF2(m, n, [s1...])
Dom::SparseMatrixF2(m, n, f)

Parameters

m, n - positive integers
s1... - sets or lists of integers between 1 and n
f - a procedure or another object that, when called with an integer between 1 and m and another integer between 1 and n, returns an element of Dom::IntegerMod(2).

Categories

Cat::Matrix(Dom::IntegerMod(2))

Related Domains

Dom::Matrix

Entries

coeffRing

The coefficient ring always equals Dom::IntegerMod(2).

isSparse

This entry is always set to TRUE.

Method zeroMatrix: matrix of a given dimension, consisting of zeros

Method _plus: add matrices

Method _negate: negate a matrix

Method matrixvectorproduct: multiply a matrix and a vector

Method _mult: multiply a matrix and a vector

Method randmatrix: generate random matrix

Method nrows: number of rows

Method ncols: number of rows

Method dimen: number of rows and columns

Method body: body of the matrix

Method row: row of a matrix

Method col: column of a matrix

Method _index: row or single entry of a matrix

Method set_index: assignment to a matrix entry

Method convert_to: conversion of a sparse matrix into another type

Example 1

We create a sparse matrix with three nonzero entries:

>> A:=Dom::SparseMatrixF2(3, 3, [{2}, {1}, {3}])
                              [{2}, {1}, {3}]

Conversion to a Dom::Matrix yields a nicer output, but now nine entries have to be stored:

>> A::dom::convert_to(A, Dom::Matrix(Dom::IntegerMod(2)))
                      +-                           -+
                      |  0 mod 2, 1 mod 2, 0 mod 2  |
                      |                             |
                      |  1 mod 2, 0 mod 2, 0 mod 2  |
                      |                             |
                      |  0 mod 2, 0 mod 2, 1 mod 2  |
                      +-                           -+

Super-Domain

Dom::BaseDomain

Axioms

Ax::canonicalRep

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000