/*
* OLMat.h
*
* Created on: Oct 17, 2015
* Author: chris
*/
#ifndef OLMAT_H_
#define OLMAT_H_
#include<iostream>
typedef int ElemType;
struct OLNode{
int i, j;
ElemType e;
OLNode *right, *down;
OLNode():i(0), j(0),
right(NULL), down(NULL) {}
};
struct OLMat{
OLNode *rhead, *chead;
int mu, nu, tu;
OLMat(): rhead(NULL), chead(NULL),
mu(0), nu(0), tu(0) {}
};
bool OLMatCreate(OLMat & mat, int nrows, int ncols);
void OLMatDestroy(OLMat & mat);
bool OLMatPutVal(OLMat & mat, int i, int j, ElemType e);
bool OLMatGetVal(OLMat & mat, int i, int j, ElemType& e);
bool OLMatDelEnt(OLMat & mat, int i, int j);
bool OLMatInput(OLMat & mat);
void OLMatPrint(OLMat & mat);
void OLMatTranspose(OLMat & mat);
#endif /* OLMAT_H_ */
/*
* OLMat.cpp
*
* Created on: Oct 17, 2015
* Author: