AllowRotation and size_t
This commit is contained in:
committed by
PaddleStroke
parent
fe99ad2593
commit
85557e1fa4
@@ -34,7 +34,7 @@ FColDsptr LDUSpMat::forAndBackSubsaveOriginal(FColDsptr, bool)
|
||||
return FColDsptr();
|
||||
}
|
||||
|
||||
double LDUSpMat::getmatrixArowimaxMagnitude(int i)
|
||||
double LDUSpMat::getmatrixArowimaxMagnitude(size_t i)
|
||||
{
|
||||
return matrixA->at(i)->maxMagnitude();
|
||||
}
|
||||
@@ -44,12 +44,12 @@ void LDUSpMat::forwardSubstituteIntoL()
|
||||
//"L is lower triangular with nonzero and ones in diagonal."
|
||||
auto vectorc = std::make_shared<FullColumn<double>>(n);
|
||||
vectorc->at(0) = rightHandSideB->at(0);
|
||||
for (int i = 1; i < n; i++)
|
||||
for (size_t i = 1; i < n; i++)
|
||||
{
|
||||
auto rowi = matrixA->at(i);
|
||||
double sum = 0.0;
|
||||
for (auto const& keyValue : *rowi) {
|
||||
int j = keyValue.first;
|
||||
size_t j = keyValue.first;
|
||||
double duij = keyValue.second;
|
||||
sum += duij * vectorc->at(j);
|
||||
}
|
||||
@@ -63,13 +63,13 @@ void LDUSpMat::backSubstituteIntoDU()
|
||||
//"DU is upper triangular with nonzero diagonals."
|
||||
|
||||
double sum, duij;
|
||||
for (int i = 0; i < m; i++)
|
||||
for (size_t i = 0; i < m; i++)
|
||||
{
|
||||
rightHandSideB->at(i) = rightHandSideB->at(i) / matrixD->at(i);
|
||||
}
|
||||
answerX = std::make_shared<FullColumn<double>>(m);
|
||||
answerX->at(n - 1) = rightHandSideB->at(m - 1);
|
||||
for (int i = n - 2; i >= 0; i--)
|
||||
for (int i = n - 2; i >= 0; i--) //Use int because of decrement
|
||||
{
|
||||
auto rowi = matrixU->at(i);
|
||||
sum = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user