linbox
test-matrix-stream.C File Reference

no doc More...

#include <linbox/linbox-config.h>
#include <iostream>
#include <fstream>
#include <string>
#include "test-common.h"
#include "linbox/util/matrix-stream.h"
#include "linbox/integer.h"
#include "linbox/matrix/sparse-matrix.h"

Typedefs

typedef Givaro::ZRing< integerTestField
 

Functions

template<class BB>
bool testMatrix (std::ostream &out, const char *filename, const char *BBName)
 
bool testMatrixStream (const string &matfile)
 
int main (int argc, char *argv[])
 

Variables

const size_t rowDim = 11
 
const size_t colDim = 11
 
int nonZeros = 33
 
integer matrix [rowDim][colDim]
 
TestField ff
 

Detailed Description

no doc

Bug
this tests reveals memory leaks
Test
NO DOC
Todo
I would like to see a matrix writer that writes sms format and generic dense format. Then we could have a self contained test that checks the write/read cycle without depending on preexisting data files.

...but data files illustrating formats that we intend to read but not write would continue to be used. -bds

Typedef Documentation

◆ TestField

typedef Givaro::ZRing<integer> TestField

Function Documentation

◆ testMatrix()

template<class BB>
bool testMatrix ( std::ostream & out,
const char * filename,
const char * BBName )

◆ testMatrixStream()

bool testMatrixStream ( const string & matfile)

◆ main()

int main ( int argc,
char * argv[] )

Variable Documentation

◆ rowDim

const size_t rowDim = 11

◆ colDim

const size_t colDim = 11

◆ nonZeros

int nonZeros = 33

◆ matrix

integer matrix[rowDim][colDim]
Initial value:
= {
{0, 0, 2, 3, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{2, 0, 0, 1, -1, 0, 0, 0, 0, 0, 6},
{3, 0, 1, 4, 0, 0, 12, 0, 0, -13, 0},
{0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0},
{0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 1, 0, 500, 400, 300, 200},
{0, 0, 0, 0, 0, 0, 0, 400, 0, 0, 0},
{1, 0, 0, -13, 0, 1, 0, 300, 0, 10, 1},
{0, 0, 6, 0, 0, 0, 0, 200, 0, 1, 0} }

◆ ff