modify code to suppress or fix warnings in gcc and clang (#41)
* first fix to start branch PR * explicit conversion from sizet to int * Array.h and DiagonalMatrix.h * many sizet to int conversions * removed some unused variables and added expl overrides * removed many unused parameters * more typing * even more * last of the easy changes
This commit is contained in:
@@ -29,7 +29,7 @@ Symsptr MbD::Product::differentiateWRT(Symsptr var)
|
||||
}
|
||||
);
|
||||
auto derivativeTerms = std::make_shared<std::vector<Symsptr>>();
|
||||
for (int i = 0; i < terms->size(); i++)
|
||||
for (int i = 0; i < (int)terms->size(); i++)
|
||||
{
|
||||
auto& derivative = derivatives->at(i);
|
||||
auto newTermFunctions = std::make_shared<std::vector<Symsptr>>(*terms);
|
||||
@@ -103,7 +103,7 @@ Symsptr Product::expandUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Sy
|
||||
return Symbolic::times(factor, sumOfProductsOfSums);
|
||||
}
|
||||
|
||||
Symsptr Product::simplifyUntil(Symsptr sptr, std::shared_ptr<std::unordered_set<Symsptr>> set)
|
||||
Symsptr Product::simplifyUntil(Symsptr, std::shared_ptr<std::unordered_set<Symsptr>> set)
|
||||
{
|
||||
auto itr = std::find_if(set->begin(), set->end(), [this](Symsptr sym) {return this == (sym.get()); });
|
||||
if (itr != set->end()) {
|
||||
@@ -146,7 +146,7 @@ std::ostream& Product::printOn(std::ostream& s) const
|
||||
{
|
||||
s << "(";
|
||||
s << *(this->terms->at(0));
|
||||
for (int i = 1; i < this->terms->size(); i++)
|
||||
for (int i = 1; i < (int)this->terms->size(); i++)
|
||||
{
|
||||
s << "*" << *(this->terms->at(i));
|
||||
}
|
||||
@@ -162,7 +162,7 @@ bool Product::isProduct()
|
||||
double Product::getValue()
|
||||
{
|
||||
double answer = 1.0;
|
||||
for (int i = 0; i < terms->size(); i++) answer *= terms->at(i)->getValue();
|
||||
for (int i = 0; i < (int)terms->size(); i++) answer *= terms->at(i)->getValue();
|
||||
return answer;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user