Logo MTL4
Public Types | Public Member Functions
math::Norm< N, Vector, Scalar > Struct Template Reference

Concept Norm. More...

#include <vector_concepts.hpp>

Inheritance diagram for math::Norm< N, Vector, Scalar >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef associated_type magnitude_type
 Associated type to represent real values in teh Field of scalar (with default)
typedef associated_type result_type_norm
 Associated type for result of norm functor.

Public Member Functions

axiom Positivity (N norm, Vector v, magnitude_type ref)
 Invariant: norm of vector is larger than zero.
axiom PositiveHomogeneity (N norm, Vector v, Scalar a)
 Invariant: positive homogeneity with scalar.
axiom TriangleInequality (N norm, Vector u, Vector v)
 Invariant: triangle inequality.

Detailed Description

template<typename N, typename Vector, typename Scalar = typename Vector::value_type>
struct math::Norm< N, Vector, Scalar >

Concept Norm.

Semantic requirements of a norm

Parameters:
NNorm functor
VectorThe the type of a vector or a collection
ScalarThe scalar over which the vector field is defined
Refinement of:
  • std::Callable1 <N, Vector>
Associated types:
  • magnitude_type
  • result_type_norm
Requires:
  • VectorSpace <Vector, Scalar>;
  • RealMagnitude < Scalar >;
  • std::Convertible <magnitude_type, Scalar>;
  • std::Convertible <result_type_norm, RealMagnitude<Scalar>::magnitude_type>;
  • std::Convertible <result_type_norm, Scalar>;

Member Typedef Documentation

template<typename N , typename Vector , typename Scalar = typename Vector::value_type>
typedef associated_type math::Norm< N, Vector, Scalar >::magnitude_type

Associated type to represent real values in teh Field of scalar (with default)

By default MagnitudeType<Scalar>::type

template<typename N , typename Vector , typename Scalar = typename Vector::value_type>
typedef associated_type math::Norm< N, Vector, Scalar >::result_type_norm

Associated type for result of norm functor.

Automatically detected


Member Function Documentation

template<typename N , typename Vector , typename Scalar = typename Vector::value_type>
axiom math::Norm< N, Vector, Scalar >::PositiveHomogeneity ( norm,
Vector  v,
Scalar  a 
) [inline]

Invariant: positive homogeneity with scalar.

norm(a * v) == abs(a) * norm(v);

template<typename N , typename Vector , typename Scalar = typename Vector::value_type>
axiom math::Norm< N, Vector, Scalar >::Positivity ( norm,
Vector  v,
magnitude_type  ref 
) [inline]

Invariant: norm of vector is larger than zero.

norm(v) >= zero(ref);

template<typename N , typename Vector , typename Scalar = typename Vector::value_type>
axiom math::Norm< N, Vector, Scalar >::TriangleInequality ( norm,
Vector  u,
Vector  v 
) [inline]

Invariant: triangle inequality.

norm(u + v) <= norm(u) + norm(v);


The documentation for this struct was generated from the following file:


math::Norm< N, Vector, Scalar > Struct Template Reference -- MTL 4 -- Peter Gottschling and Andrew Lumsdaine -- Gen. with rev. 7542 on Sat Aug 11 2012 by doxygen 1.7.6.1 -- © 2010 by SimuNova UG.