Correct compilation warnings for 'int' casts with correct types (#75)
This commit is contained in:
@@ -156,11 +156,11 @@ void LDUFullMat::backSubstituteIntoDU()
|
||||
//| rowi sum |
|
||||
answerX = std::make_shared<FullColumn<double>>(n);
|
||||
answerX->at(n - 1) = rightHandSideB->at(m - 1) / matrixA->at(m - 1)->at(n - 1);
|
||||
for (int i = (int)n - 2; i >= 0; i--) //Use int because of decrement
|
||||
for (ssize_t i = (ssize_t)n - 2; i >= 0; i--) //Use ssize_t because of decrement
|
||||
{
|
||||
auto& rowi = matrixA->at(i);
|
||||
double sum = answerX->at((size_t)n - 1) * rowi->at((size_t)n - 1);
|
||||
for (int j = i + 1; j < (int)n - 1; j++)
|
||||
double sum = answerX->at(n - 1) * rowi->at(n - 1);
|
||||
for (size_t j = i + 1; j < n - 1; j++)
|
||||
{
|
||||
sum += answerX->at(j) * rowi->at(j);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user