Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/stnava/ANTs
Browse files Browse the repository at this point in the history
  • Loading branch information
ntustison committed Nov 7, 2013
2 parents 748da8d + 40dcf12 commit bf3730d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tensor/TensorFunctions.h
Expand Up @@ -64,7 +64,7 @@ void Vector2Matrix( TensorType & dtv, MatrixType & dtm )
unsigned int tensorIndex = 0;
for(unsigned i = 0; i < matHelper::Rows(dtm); ++i)
{
for(unsigned j = i; matHelper::Columns(dtm); ++j, ++tensorIndex)
for(unsigned j = i; j < matHelper::Columns(dtm); ++j, ++tensorIndex)
{
dtm(i,j) = dtm(j,i) = dtv[tensorIndex];
}
Expand Down Expand Up @@ -95,7 +95,7 @@ TensorType Matrix2Vector( MatrixType dtm )
unsigned int tensorIndex = 0;
for(unsigned i = 0; i < dtm.rows(); ++i)
{
for(unsigned j = i; dtm.cols(); ++j, ++tensorIndex)
for(unsigned j = i; j < dtm.cols(); ++j, ++tensorIndex)
{
dtv[tensorIndex] = dtm(i,j);
}
Expand Down

0 comments on commit bf3730d

Please sign in to comment.