Skip to content

Commit

Permalink
Array.h and DiagonalMatrix.h
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAD committed Dec 6, 2023
1 parent e107216 commit ed88f20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions OndselSolver/Array.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace MbD {
template<typename T>
inline void Array<T>::zeroSelf()
{
for (int i = 0; i < this->size(); i++) {
for (int i = 0; i < (int)this->size(); i++) {
this->at(i) = (T)0;
}
}
Expand Down Expand Up @@ -168,7 +168,7 @@ namespace MbD {
template<typename T>
inline void Array<T>::magnifySelf(T factor)
{
for (int i = 0; i < this->size(); i++)
for (int i = 0; i < (int)this->size(); i++)
{
this->atitimes(i, factor);
}
Expand Down
8 changes: 4 additions & 4 deletions OndselSolver/DiagonalMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace MbD {
}
}
template<typename T>
inline DiagMatsptr<T> DiagonalMatrix<T>::times(T factor)
inline DiagMatsptr<T> DiagonalMatrix<T>::times(T)
{
assert(false);
}
Expand Down Expand Up @@ -98,7 +98,7 @@ namespace MbD {
inline double DiagonalMatrix<double>::sumOfSquares()
{
double sum = 0.0;
for (int i = 0; i < this->size(); i++)
for (int i = 0; i < (int)this->size(); i++)
{
double element = this->at(i);
sum += element * element;
Expand All @@ -114,15 +114,15 @@ namespace MbD {
template<>
inline void DiagonalMatrix<double>::zeroSelf()
{
for (int i = 0; i < this->size(); i++) {
for (int i = 0; i < (int)this->size(); i++) {
this->at(i) = 0.0;
}
}
template<>
inline double DiagonalMatrix<double>::maxMagnitude()
{
double max = 0.0;
for (int i = 0; i < this->size(); i++)
for (int i = 0; i < (int)this->size(); i++)
{
double element = this->at(i);
if (element < 0.0) element = -element;
Expand Down

0 comments on commit ed88f20

Please sign in to comment.