GiNaC  1.6.2
Public Member Functions | Protected Attributes
GiNaC::scalar_products Class Reference

Helper class for storing information about known scalar products which are to be automatically replaced by simplify_indexed(). More...

#include <indexed.h>

List of all members.

Public Member Functions

void add (const ex &v1, const ex &v2, const ex &sp)
 Register scalar product pair and its value.
void add (const ex &v1, const ex &v2, const ex &dim, const ex &sp)
 Register scalar product pair and its value for a specific space dimension.
void add_vectors (const lst &l, const ex &dim=wild())
 Register list of vectors.
void clear ()
 Clear all registered scalar products.
bool is_defined (const ex &v1, const ex &v2, const ex &dim) const
 Check whether scalar product pair is defined.
ex evaluate (const ex &v1, const ex &v2, const ex &dim) const
 Return value of defined scalar product pair.
void debugprint () const

Protected Attributes

spmap spm

Detailed Description

Helper class for storing information about known scalar products which are to be automatically replaced by simplify_indexed().

See also:
simplify_indexed

Definition at line 227 of file indexed.h.


Member Function Documentation

void GiNaC::scalar_products::add ( const ex v1,
const ex v2,
const ex sp 
)

Register scalar product pair and its value.

Definition at line 1349 of file indexed.cpp.

References spm.

Referenced by add_vectors().

void GiNaC::scalar_products::add ( const ex v1,
const ex v2,
const ex dim,
const ex sp 
)

Register scalar product pair and its value for a specific space dimension.

Definition at line 1354 of file indexed.cpp.

References spm.

void GiNaC::scalar_products::add_vectors ( const lst l,
const ex dim = wild() 
)

Register list of vectors.

This adds all possible pairs of products a.i * b.i with the value a*b (note that this is not a scalar vector product but an ordinary product of scalars).

Definition at line 1359 of file indexed.cpp.

References add(), GiNaC::container< C >::begin(), and GiNaC::container< C >::end().

void GiNaC::scalar_products::clear ( )

Clear all registered scalar products.

Definition at line 1367 of file indexed.cpp.

References spm.

bool GiNaC::scalar_products::is_defined ( const ex v1,
const ex v2,
const ex dim 
) const

Check whether scalar product pair is defined.

Definition at line 1373 of file indexed.cpp.

References spm.

Referenced by GiNaC::simplify_indexed_product().

ex GiNaC::scalar_products::evaluate ( const ex v1,
const ex v2,
const ex dim 
) const

Return value of defined scalar product pair.

Definition at line 1379 of file indexed.cpp.

References spm.

Referenced by GiNaC::simplify_indexed_product().

void GiNaC::scalar_products::debugprint ( ) const

Definition at line 1384 of file indexed.cpp.

References GiNaC::spmapkey::debugprint(), k, and spm.


Member Data Documentation

Definition at line 248 of file indexed.h.

Referenced by add(), clear(), debugprint(), evaluate(), and is_defined().


The documentation for this class was generated from the following files:

This page is part of the GiNaC developer's reference. It was generated automatically by doxygen. For an introduction, see the tutorial.