GiNaC  1.6.2
Public Member Functions | Public Attributes
GiNaC::expair Class Reference

A pair of expressions. More...

#include <expair.h>

List of all members.

Public Member Functions

 expair ()
 expair (const ex &r, const ex &c)
 Construct an expair from two ex.
bool is_equal (const expair &other) const
 Member-wise check for canonical ordering equality.
bool is_less (const expair &other) const
 Member-wise check for canonical ordering lessness.
int compare (const expair &other) const
 Member-wise check for canonical ordering.
void print (std::ostream &os) const
bool is_canonical_numeric () const
 True if this is of the form (numeric,ex(1)).
void swap (expair &other)
 Swap contents with other expair.
const expair conjugate () const

Public Attributes

ex rest
 first member of pair, an arbitrary expression
ex coeff
 second member of pair, must be numeric

Detailed Description

A pair of expressions.

This is similar to STL's pair<>. It is slightly extended since we need to account for methods like .compare(). Also, since this is meant for use by class expairseq it must satisfy the invariance that the member coeff must be of type numeric.

Definition at line 37 of file expair.h.


Constructor & Destructor Documentation

GiNaC::expair::expair ( ) [inline]

Definition at line 40 of file expair.h.

Referenced by conjugate().

GiNaC::expair::expair ( const ex r,
const ex c 
) [inline]

Construct an expair from two ex.

Definition at line 43 of file expair.h.

References coeff, and GINAC_ASSERT.


Member Function Documentation

bool GiNaC::expair::is_equal ( const expair other) const [inline]

Member-wise check for canonical ordering equality.

Definition at line 49 of file expair.h.

References coeff, GiNaC::ex::is_equal(), and rest.

Referenced by GiNaC::conjugateepvector(), and GiNaC::mul::expair_needs_further_processing().

bool GiNaC::expair::is_less ( const expair other) const [inline]

Member-wise check for canonical ordering lessness.

Definition at line 55 of file expair.h.

References coeff, GiNaC::ex::compare(), and rest.

Referenced by GiNaC::expair_is_less::operator()().

int GiNaC::expair::compare ( const expair other) const [inline]

Member-wise check for canonical ordering.

Definition at line 63 of file expair.h.

References coeff, GiNaC::ex::compare(), and rest.

void GiNaC::expair::print ( std::ostream &  os) const

Definition at line 30 of file expair.cpp.

References c, coeff, GiNaC::print_tree::delta_indent, GiNaC::ex::print(), and rest.

bool GiNaC::expair::is_canonical_numeric ( ) const [inline]

True if this is of the form (numeric,ex(1)).

Definition at line 75 of file expair.h.

References coeff, GINAC_ASSERT, GiNaC::ex::is_equal(), and rest.

void GiNaC::expair::swap ( expair other) [inline]

Swap contents with other expair.

Definition at line 82 of file expair.h.

References coeff, rest, and GiNaC::ex::swap().

Referenced by GiNaC::mul::derivative(), GiNaC::expair_swap::operator()(), and GiNaC::swap().

const expair GiNaC::expair::conjugate ( ) const

Definition at line 38 of file expair.cpp.

References GiNaC::are_ex_trivially_equal(), coeff, GiNaC::ex::conjugate(), expair(), and rest.


Member Data Documentation


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.