Commit eef2ef04 authored by Kirill Terekhov's avatar Kirill Terekhov
Browse files

Code for submatrix

parent c40b897e
......@@ -975,7 +975,16 @@ namespace INMOST
} while( repeat );
return V;
}
Matrix SubMatrix(enumerator ibeg, enumerator jbeg, enumerator iend, enumerator jend)
{
Matrix ret(iend-ibeg,jend-jbeg);
for(enumerator i = ibeg; i < iend; ++i)
{
for(enumerator j = jbeg; j < jend; ++j)
ret(i-ibeg,j-ibeg) = (*this)(i,j);
}
return ret;
}
};
typedef Matrix<INMOST_DATA_REAL_TYPE> rMatrix; //shortcut for real matrix
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment