CAPD RedHom Library
capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar > Class Template Reference

#include <capd/complex/AKQStrategy.hpp>

Public Types

enum  AKQType { UNSET, KING, QUEEN, ACE }
 
typedef std::unordered_map< int, Scalar > PathsInfo
 
typedef std::unordered_map< std::pair< int, int >, Scalar, boost::hash< std::pair< int, int > > > CoeffsMap
 
typedef OutputComplexT OutputComplexType
 
typedef SComplexT SComplex
 
typedef DefaultReduceStrategyTraits< SComplexTraits
 
typedef SComplex::Cell Cell
 
typedef SComplex::Cell::Id Id
 
typedef CellDimIndexer< CellDimIndexerType
 

Public Member Functions

 AKQReduceStrategy (SComplex &_complex)
 
SComplexgetComplex () const
 
template<typename CellT1 , typename CellT2 >
void coreduce (CellT1 &a, CellT2 &b)
 
Traits::Extract::result_type extract ()
 
boost::shared_ptr< OutputComplexTypegetOutputComplex ()
 
template<typename Inserter >
bool forceCoreductionPair (Inserter inserter)
 
template<typename ArgT >
Traits::template GetCoreductionPair< ArgT >::result_type getCoreductionPair (const ArgT &cell)
 
template<typename ArgT >
Traits::template GetCoreductionPair< ArgT >::result_type getReductionPair (const ArgT &cell)
 

Static Public Member Functions

template<typename ImplT >
static bool reduced (const ImplT &cell)
 
template<typename ImplT1 , typename ImplT2 >
static void coreduce (ImplT1 &a, ImplT2 &b)
 
template<typename ImplT1 , typename ImplT2 >
static void reduce (ImplT1 &a, ImplT2 &b)
 
template<typename ImplT >
static void reduce (ImplT &cell)
 

Public Attributes

DimIndexerType dimIndexer
 
DimIndexerType::iterator extractIt
 
DimIndexerType::iterator extractEnd
 
std::vector< int > morse
 
std::vector< AKQTypeakq
 
std::vector< IdkerKing
 
std::vector< Idaces
 
int infosUsed
 
std::vector< PathsInfopathsInfoPool
 
std::vector< PathsInfo * > followMemoTable
 
int extractDim
 
int maxExtractDim
 
CoeffsMap coeffs
 
PathsInfo emptyPathsInfo
 
boost::shared_ptr< OutputComplexTypeoutputComplex
 
 CAPD_CLASS_LOGGER
 

Protected Member Functions

template<typename CellT >
int calcMorseValue (const CellT &cell)
 
template<typename CellT1 , typename CellT2 >
void kingGetsMarried (const CellT1 &king, const CellT2 &queen)
 
template<typename CellT1 , typename CellT2 >
Scalar toAceCoeff (const CellT1 &x, const CellT2 &y)
 
template<typename Cell1 , typename Cell2 , typename Cell3 >
Scalar toKingCoeff (const Cell1 &x, const Cell2 &y, const Cell3 &y_star)
 
template<typename CellT1 , typename CellT2 >
const PathsInfofollowPathMemo (const CellT1 &curr, const CellT2 &from)
 
void reportPaths ()
 

Protected Attributes

SComplexcomplex
 
Cell dummyCell2
 
Cell dummyCell3
 
bool extracted
 
bool _closedComplex
 

Member Typedef Documentation

template<typename SComplexT , typename OutputComplexT , typename Scalar >
typedef SComplex::Cell capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::Cell
template<typename SComplexT , typename OutputComplexT , typename Scalar >
typedef std::unordered_map<std::pair<int,int>, Scalar, boost::hash<std::pair<int,int> > > capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::CoeffsMap
template<typename SComplexT , typename OutputComplexT , typename Scalar >
typedef CellDimIndexer<Cell> capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::DimIndexerType
template<typename SComplexT , typename OutputComplexT , typename Scalar >
typedef SComplex::Cell::Id capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::Id
template<typename SComplexT , typename OutputComplexT , typename Scalar >
typedef OutputComplexT capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::OutputComplexType
template<typename SComplexT , typename OutputComplexT , typename Scalar >
typedef std::unordered_map<int, Scalar> capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::PathsInfo
template<typename SComplexT , typename OutputComplexT , typename Scalar >
typedef SComplexT capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::SComplex
template<typename SComplexT , typename OutputComplexT , typename Scalar >
typedef DefaultReduceStrategyTraits<SComplex> capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::Traits

Member Enumeration Documentation

template<typename SComplexT , typename OutputComplexT , typename Scalar >
enum capd::complex::AKQReduceStrategy::AKQType
Enumerator
UNSET 
KING 
QUEEN 
ACE 

Constructor & Destructor Documentation

template<typename SComplexT , typename OutputComplexT , typename Scalar >
capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::AKQReduceStrategy ( SComplex _complex)
inline

Member Function Documentation

template<typename SComplexT , typename OutputComplexT , typename Scalar >
template<typename CellT >
int capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::calcMorseValue ( const CellT &  cell)
inlineprotected
template<typename SComplexT >
template<typename ImplT1 , typename ImplT2 >
static void capd::complex::DefaultReduceStrategyBase< SComplexT >::coreduce ( ImplT1 &  a,
ImplT2 &  b 
)
inlinestaticinherited
template<typename SComplexT , typename OutputComplexT , typename Scalar >
template<typename CellT1 , typename CellT2 >
void capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::coreduce ( CellT1 &  a,
CellT2 &  b 
)
inline
template<typename SComplexT , typename OutputComplexT , typename Scalar >
Traits::Extract::result_type capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::extract ( )
inline
template<typename SComplexT , typename OutputComplexT , typename Scalar >
template<typename CellT1 , typename CellT2 >
const PathsInfo& capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::followPathMemo ( const CellT1 &  curr,
const CellT2 &  from 
)
inlineprotected
template<typename SComplexT >
template<typename Inserter >
bool capd::complex::DefaultReduceStrategyBase< SComplexT >::forceCoreductionPair ( Inserter  inserter)
inlineinherited
template<typename SComplexT , typename OutputComplexT , typename Scalar >
SComplex& capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::getComplex ( ) const
inline
template<typename SComplexT >
template<typename ArgT >
Traits::template GetCoreductionPair<ArgT>::result_type capd::complex::DefaultReduceStrategyBase< SComplexT >::getCoreductionPair ( const ArgT &  cell)
inlineinherited
template<typename SComplexT , typename OutputComplexT , typename Scalar >
boost::shared_ptr<OutputComplexType> capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::getOutputComplex ( )
inline
template<typename SComplexT >
template<typename ArgT >
Traits::template GetCoreductionPair<ArgT>::result_type capd::complex::DefaultReduceStrategyBase< SComplexT >::getReductionPair ( const ArgT &  cell)
inlineinherited
template<typename SComplexT , typename OutputComplexT , typename Scalar >
template<typename CellT1 , typename CellT2 >
void capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::kingGetsMarried ( const CellT1 &  king,
const CellT2 &  queen 
)
inlineprotected
template<typename SComplexT >
template<typename ImplT1 , typename ImplT2 >
static void capd::complex::DefaultReduceStrategyBase< SComplexT >::reduce ( ImplT1 &  a,
ImplT2 &  b 
)
inlinestaticinherited
template<typename SComplexT >
template<typename ImplT >
static void capd::complex::DefaultReduceStrategyBase< SComplexT >::reduce ( ImplT &  cell)
inlinestaticinherited
template<typename SComplexT >
template<typename ImplT >
static bool capd::complex::DefaultReduceStrategyBase< SComplexT >::reduced ( const ImplT &  cell)
inlinestaticinherited
template<typename SComplexT , typename OutputComplexT , typename Scalar >
void capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::reportPaths ( )
inlineprotected
template<typename SComplexT , typename OutputComplexT , typename Scalar >
template<typename CellT1 , typename CellT2 >
Scalar capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::toAceCoeff ( const CellT1 &  x,
const CellT2 &  y 
)
inlineprotected
template<typename SComplexT , typename OutputComplexT , typename Scalar >
template<typename Cell1 , typename Cell2 , typename Cell3 >
Scalar capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::toKingCoeff ( const Cell1 &  x,
const Cell2 &  y,
const Cell3 &  y_star 
)
inlineprotected

Member Data Documentation

template<typename SComplexT >
bool capd::complex::DefaultReduceStrategyBase< SComplexT >::_closedComplex
protectedinherited
template<typename SComplexT , typename OutputComplexT , typename Scalar >
std::vector<Id> capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::aces
template<typename SComplexT , typename OutputComplexT , typename Scalar >
std::vector<AKQType> capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::akq
template<typename SComplexT , typename OutputComplexT , typename Scalar >
capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::CAPD_CLASS_LOGGER
template<typename SComplexT , typename OutputComplexT , typename Scalar >
CoeffsMap capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::coeffs
template<typename SComplexT >
SComplex& capd::complex::DefaultReduceStrategyBase< SComplexT >::complex
protectedinherited
template<typename SComplexT , typename OutputComplexT , typename Scalar >
DimIndexerType capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::dimIndexer
template<typename SComplexT >
Cell capd::complex::DefaultReduceStrategyBase< SComplexT >::dummyCell2
protectedinherited
template<typename SComplexT >
Cell capd::complex::DefaultReduceStrategyBase< SComplexT >::dummyCell3
protectedinherited
template<typename SComplexT , typename OutputComplexT , typename Scalar >
PathsInfo capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::emptyPathsInfo
template<typename SComplexT , typename OutputComplexT , typename Scalar >
int capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::extractDim
template<typename SComplexT >
bool capd::complex::DefaultReduceStrategyBase< SComplexT >::extracted
protectedinherited
template<typename SComplexT , typename OutputComplexT , typename Scalar >
DimIndexerType::iterator capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::extractEnd
template<typename SComplexT , typename OutputComplexT , typename Scalar >
DimIndexerType::iterator capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::extractIt
template<typename SComplexT , typename OutputComplexT , typename Scalar >
std::vector<PathsInfo*> capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::followMemoTable
template<typename SComplexT , typename OutputComplexT , typename Scalar >
int capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::infosUsed
template<typename SComplexT , typename OutputComplexT , typename Scalar >
std::vector<Id> capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::kerKing
template<typename SComplexT , typename OutputComplexT , typename Scalar >
int capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::maxExtractDim
template<typename SComplexT , typename OutputComplexT , typename Scalar >
std::vector<int> capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::morse
template<typename SComplexT , typename OutputComplexT , typename Scalar >
boost::shared_ptr<OutputComplexType> capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::outputComplex
template<typename SComplexT , typename OutputComplexT , typename Scalar >
std::vector<PathsInfo> capd::complex::AKQReduceStrategy< SComplexT, OutputComplexT, Scalar >::pathsInfoPool