GiNaC 1.8.7
Public Member Functions | Protected Attributes | List of all members
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>

Public Member Functions

void add (const ex &v1, const ex &v2, const ex &sp)
 Register scalar product pair and its value. More...
 
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. More...
 
void add_vectors (const lst &l, const ex &dim=wild())
 Register list of vectors. More...
 
void clear ()
 Clear all registered scalar products. More...
 
bool is_defined (const ex &v1, const ex &v2, const ex &dim) const
 Check whether scalar product pair is defined. More...
 
ex evaluate (const ex &v1, const ex &v2, const ex &dim) const
 Return value of defined scalar product pair. More...
 
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 217 of file indexed.h.

Member Function Documentation

◆ add() [1/2]

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

Register scalar product pair and its value.

Definition at line 1348 of file indexed.cpp.

References spm.

Referenced by add_vectors().

◆ add() [2/2]

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 1353 of file indexed.cpp.

References spm.

◆ add_vectors()

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 1358 of file indexed.cpp.

References add().

◆ clear()

void GiNaC::scalar_products::clear ( )

Clear all registered scalar products.

Definition at line 1366 of file indexed.cpp.

References spm.

◆ is_defined()

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 1372 of file indexed.cpp.

References spm.

◆ evaluate()

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 1378 of file indexed.cpp.

References spm.

◆ debugprint()

void GiNaC::scalar_products::debugprint ( ) const

Definition at line 1383 of file indexed.cpp.

References k, and spm.

Member Data Documentation

◆ spm

spmap GiNaC::scalar_products::spm
protected

Definition at line 238 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.