Added C functions for linear algebra, to be converted to kraken and used as benchmark

This commit is contained in:
Chris Fadden
2015-03-18 18:35:00 -04:00
parent a268f1b768
commit d2fc32d0fb
12 changed files with 386 additions and 58 deletions

View File

@@ -0,0 +1,37 @@
import vector:*;
import io:*;
typedef ChrisMatrix(Destructable)
{
/***************
* Member Data
**************/
|double**| data;
|int| rowSize;
|int| columnSize;
/**************************
* Constructor/Destructor
*************************/
|double***| construct()
{
rowSize = 0;
colSize = 0;
//data = NULL; Will this work?
return this;
}
|bool| Initialize(|int| m, |int| n)
{
data = malloc(sizeof(double*)*m);
for(|int| i = 0; i < m; i++)
{
data[i] = malloc(sizeof(double)*n);
}
rowSize = m;
colSize = n;
}//end itialize function
}//end Matrix class