The ChainCon Software (Release 0.03)
Classes | Functions
chain.h File Reference

A chain with coefficients in an arbitrary commutative ring. More...

#include <istream>
#include <ostream>
#include "chomp/system/config.h"
#include "chomp/struct/hashsets.h"
#include "chaincon/extarray.h"

Go to the source code of this file.

Classes

class  tChain< CellT, CoefT >
 A chain with coefficients in an arbitrary ring. More...
 

Functions

template<class CellT , class CoefT >
std::ostream & operator<< (std::ostream &out, const tChain< CellT, CoefT > &c)
 Writes a chain to an output stream. More...
 
template<class CellT , class CoefT >
std::istream & operator>> (std::istream &in, tChain< CellT, CoefT > &c)
 Reads a chain from an input stream. More...
 
template<class CellT , class CoefT >
tChain< CellT, CoefT > operator+ (const tChain< CellT, CoefT > &a, const tChain< CellT, CoefT > &b)
 Computes the sum of two chains. More...
 
template<class CellT , class CoefT >
CoefT operator* (const tChain< CellT, CoefT > &a, const tChain< CellT, CoefT > &b)
 Computes the dot product of two chains. More...
 

Detailed Description

A chain with coefficients in an arbitrary commutative ring.

Definition in file chain.h.

Function Documentation

◆ operator*()

template<class CellT , class CoefT >
CoefT operator* ( const tChain< CellT, CoefT > &  a,
const tChain< CellT, CoefT > &  b 
)

Computes the dot product of two chains.

Definition at line 287 of file chain.h.

References tChain< CellT, CoefT >::getCell(), tChain< CellT, CoefT >::getCoef(), tChain< CellT, CoefT >::position(), and tChain< CellT, CoefT >::size().

◆ operator+()

template<class CellT , class CoefT >
tChain<CellT,CoefT> operator+ ( const tChain< CellT, CoefT > &  a,
const tChain< CellT, CoefT > &  b 
)

Computes the sum of two chains.

Definition at line 277 of file chain.h.

◆ operator<<()

template<class CellT , class CoefT >
std::ostream& operator<< ( std::ostream &  out,
const tChain< CellT, CoefT > &  c 
)

Writes a chain to an output stream.

Definition at line 248 of file chain.h.

References tChain< CellT, CoefT >::getCell(), tChain< CellT, CoefT >::getCoef(), and tChain< CellT, CoefT >::size().

◆ operator>>()

template<class CellT , class CoefT >
std::istream& operator>> ( std::istream &  in,
tChain< CellT, CoefT > &  c 
)

Reads a chain from an input stream.

Definition at line 267 of file chain.h.