Skip to content

Instantly share code, notes, and snippets.

@ftalbrecht
Created July 3, 2015 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ftalbrecht/895c0eff8b080104ac3d to your computer and use it in GitHub Desktop.
Save ftalbrecht/895c0eff8b080104ac3d to your computer and use it in GitHub Desktop.
template< class GridViewImp, class RangeImp, class SourceImp = RangeImp, class FieldImp = typename RangeImp::RangeFieldType >
class LocalizableProductInterface
: public Stuff::Grid::Walker< GridViewImp >
{
// not all methods an types shown ...
public:
LocalizableProductInterface(GridViewType grd_vw)
: BaseType(grd_vw)
{}
virtual ~LocalizableProductInterface() = default;
/// \name Have to be implemented by any derived class
/// \{
virtual const RangeType& range() const = 0;
virtual const SourceType& source() const = 0;
virtual FieldType apply2() = 0;
virtual FieldType induced_norm()
{
return std::sqrt(apply2());
}
/// \}
}; // class LocalizableProductInterface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment