Avoid copying parameters

This commit is contained in:
mikekaganski
2015-02-23 17:36:15 +10:00
parent e41783a38b
commit f8bb1c0044
9 changed files with 22 additions and 24 deletions

View File

@@ -12,7 +12,7 @@
#include "MatrixMath.h"
#include "Exceptions.h"
double root_sum_square(std::vector<double> x)
double root_sum_square(const std::vector<double> &x)
{
double sum = 0;
for (unsigned int i=0; i<x.size(); i++)
@@ -67,7 +67,7 @@ std::vector<std::string> strsplit(std::string s, char del)
return v;
}
double interp1d(std::vector<double> *x, std::vector<double> *y, double x0)
double interp1d(const std::vector<double> *x, const std::vector<double> *y, double x0)
{
std::size_t i,L,R,M;
L=0;