bool SparseRow::FindElement(UINT Col, SparseElement* &Output) { bool MatchFound = false; Output = NULL; for(UINT i=0;i= Size) cout << "Non-square element added." << endl; if(Rows[Row].FindElement(Col, Element)) { Element->Entry += Entry; } else { SparseElement NewElement; NewElement.Col = Col; NewElement.Entry = Entry; Rows[Row].Data.PushEnd(NewElement); } } void SparseMatrix::Transpose(SparseMatrix &O) { SparseElement *Element; O.Rows.FreeMemory(); O.Init(Size); for(UINT i=0;iCol, i, Element->Entry); } } } void Multiply(Vector &Output, SparseMatrix &M, Vector &V) { SparseElement *E; if(Output.Length() != V.Length()) { Output.Allocate(V.Length()); } for(UINT i=0;iEntry * V[E->Col]; } Output[i] = Total; } } void Multiply(Vector &Output, double D, Vector &V) { for(UINT i=0;i &Output, Vector &V, double D) { Multiply(Output, D, V); } double Multiply(Vector &L, Vector &R) { double Total = 0.0; for(UINT i=0;i &Output, Vector &L, Vector &R) { for(UINT i=0;i &Output, Vector &L, Vector &R) { for(UINT i=0;i