Skip to content
Snippets Groups Projects
Commit bed4451b authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

New method 'metric' that computes the Riemannian scalar product.

This is a new required method for the interface of implementations of
the TargetSpace model.  We haven't needed it previously because all
spaces considered until today were embedded isometrically in a
Euclidean space.

[[Imported from SVN: r9189]]
parent 3e9cdedc
No related branches found
No related tags found
No related merge requests found
......@@ -527,6 +527,12 @@ public:
return Dune::FieldMatrix<T,N,N>(result);
}
/** \brief Scalar product of two tangent vectors */
T metric(const TangentVector& v, const TangentVector& w) const
{
return v*w/(data_[N-1]*data_[N-1]);
}
/** \brief Write unit vector object to output stream */
friend std::ostream& operator<< (std::ostream& s, const HyperbolicHalfspacePoint& p)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment