Skip to content
Snippets Groups Projects
Commit cc5a62dc authored by Peter Bastian's avatar Peter Bastian
Browse files

distance methode dazugefuegt.

[[Imported from SVN: r60]]
parent 93554233
No related branches found
No related tags found
No related merge requests found
......@@ -132,6 +132,14 @@ namespace Dune {
return s;
}
//! Eucledian distance of two vectors
T distance (const Vec<n,T>& b) const
{
T s=0.0;
for (int i=0; i<n; i++) s += (x[i]-b.x[i])*(x[i]-b.x[i]);
return sqrt(s);
}
void print (std::ostream& s, int indent) const
{
for (int k=0; k<indent; k++) s << " ";
......
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