Skip to content
Snippets Groups Projects
Commit 0a432f69 authored by Mark Jenkinson's avatar Mark Jenkinson
Browse files

Added overloaded norm2(a,b,c) fns

parent 5ee22883
No related branches found
No related tags found
No related merge requests found
......@@ -22,5 +22,8 @@ quick:${OBJS} quick.o
libmiscmaths.a: ${OBJS}
${AR} -r libmiscmaths.a ${OBJS}
testprog: testprog.o
${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ ${OBJS} testprog.o ${LIBS}
......@@ -407,6 +407,15 @@ namespace MISCMATHS {
return std::sqrt(x.SumSquare());
}
double norm2(double a, double b, double c)
{
return a*a + b*b + c*c;
}
float norm2(float a, float b, float c)
{
return a*a + b*b + c*c;
}
int Identity(Matrix& m)
{
......
......@@ -106,6 +106,8 @@ namespace MISCMATHS {
{ return Sum(SP(a,b)); }
double norm2(const ColumnVector& x);
double norm2(double a, double b, double c);
float norm2(float a, float b, float c);
int Identity(Matrix& m);
ReturnMatrix Identity(int num);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment