Fix trivial warnings.

This commit is contained in:
Gael Guennebaud 2015-07-20 13:55:48 +02:00
parent c11971de37
commit 2d93060291
2 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,8 @@ void saveAsBitmap(const Eigen::VectorXd& x, int n, const char* filename);
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
assert(argc==2);
int n = 300; // size of the image int n = 300; // size of the image
int m = n*n; // number of unknows (=number of pixels) int m = n*n; // number of unknows (=number of pixels)

View File

@ -8,7 +8,7 @@ typedef Eigen::Triplet<double> T;
void insertCoefficient(int id, int i, int j, double w, std::vector<T>& coeffs, void insertCoefficient(int id, int i, int j, double w, std::vector<T>& coeffs,
Eigen::VectorXd& b, const Eigen::VectorXd& boundary) Eigen::VectorXd& b, const Eigen::VectorXd& boundary)
{ {
int n = boundary.size(); int n = int(boundary.size());
int id1 = i+j*n; int id1 = i+j*n;
if(i==-1 || i==n) b(id) -= w * boundary(j); // constrained coefficient if(i==-1 || i==n) b(id) -= w * boundary(j); // constrained coefficient