[GiNaC-list] GiNaC::marix::solve(..)

Richard B. Kreckel kreckel at ginac.de
Thu Jun 4 11:12:58 CEST 2009


Hi!

Lisa Maletzki wrote:
> That was a little overhasty I suppose because I came across another 
> problem. The following snippet of code will give me a 
> matrix::operator(): index out of range.
> 
> unsigned size = 18;
> matrix vectorX(size, 1);
> for (unsigned i = 0; i < size; i++) {
>     vectorX(i, 1) = vars[i];
> }

Well, vectorX(i, 1) refers to the second column.
GiNaC follows C/C++ index notation throughout.

   -richy.
-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>


More information about the GiNaC-list mailing list