Z
Zoran Stipanicev
I have c++ code, showed below, for allocating lower triangular matrix
and I have to write that in .NET (cli). I can't use 1D array because
I want to use property [,] with 2D notation (like LowerTriM[r,c]).
This works fine in native c++ but I have no idea how to do it in cli.
Any suggestions?
typedef float Type;
Type **conteiner_;
//alocate row pointers
conteiner_ = new Type*[r]
//alocate lower triangular matrix
conteiner_[0] = new Type[(r*(r+1))/2];
//set row pointers
for(int i = 1; i < row_; ++i )
{
conteiner_ = conteiner_[i-1] + i;
}
Thx!
Best regards,
Zoran Stipanicev
and I have to write that in .NET (cli). I can't use 1D array because
I want to use property [,] with 2D notation (like LowerTriM[r,c]).
This works fine in native c++ but I have no idea how to do it in cli.
Any suggestions?
typedef float Type;
Type **conteiner_;
//alocate row pointers
conteiner_ = new Type*[r]
//alocate lower triangular matrix
conteiner_[0] = new Type[(r*(r+1))/2];
//set row pointers
for(int i = 1; i < row_; ++i )
{
conteiner_ = conteiner_[i-1] + i;
}
Thx!
Best regards,
Zoran Stipanicev