pbori_algo.h File Reference

#include "pbori_defs.h"
#include "pbori_func.h"
#include "pbori_traits.h"
#include "cudd.h"
#include "cuddInt.h"
#include "CCuddInterface.h"

Go to the source code of this file.

Functions

template<class NaviType , class TermType , class TernaryOperator , class TerminalOperator >
BEGIN_NAMESPACE_PBORI TermType dd_backward_transform (NaviType navi, TermType init, TernaryOperator newNode, TerminalOperator terminate)
 Function templates for transforming decision diagrams.
template<class NaviType , class TermType , class OutIterator , class ThenBinaryOperator , class ElseBinaryOperator , class TerminalOperator >
OutIterator dd_transform (NaviType navi, TermType init, OutIterator result, ThenBinaryOperator then_binop, ElseBinaryOperator else_binop, TerminalOperator terminate)
 Function templates for transforming decision diagrams.
template<class NaviType , class TermType , class OutIterator , class ThenBinaryOperator , class ElseBinaryOperator , class TerminalOperator , class FirstTermOp >
OutIterator dd_transform (NaviType navi, TermType init, OutIterator result, ThenBinaryOperator then_binop, ElseBinaryOperator else_binop, TerminalOperator terminate, FirstTermOp terminate_first)
template<class NaviType , class TermType , class OutIterator , class ThenBinaryOperator , class ElseBinaryOperator >
void dd_transform (const NaviType &navi, const TermType &init, const OutIterator &result, const ThenBinaryOperator &then_binop, const ElseBinaryOperator &else_binop)
 Function templates for transforming decision diagrams.
template<class NaviType , class TermType , class OutIterator , class ThenBinaryOperator >
void dd_transform (const NaviType &navi, const TermType &init, const OutIterator &result, const ThenBinaryOperator &then_binop)
 Function templates for transforming decision diagrams.
template<class InputIterator , class OutputIterator , class FirstFunction , class UnaryFunction >
OutputIterator special_first_transform (InputIterator first, InputIterator last, OutputIterator result, UnaryFunction op, FirstFunction firstop)
template<class InputIterator , class Intermediate , class OutputIterator >
OutputIterator reversed_inter_copy (InputIterator start, InputIterator finish, Intermediate &inter, OutputIterator output)
 Function templates doing a reversed copy using intermediate storage.
template<class NaviType >
bool dd_on_path (NaviType navi)
template<class NaviType , class OrderedIterator >
bool dd_owns_term_of_indices (NaviType navi, OrderedIterator start, OrderedIterator finish)
template<class NaviType , class OrderedIterator , class NodeOperation >
NaviType dd_intersect_some_index (NaviType navi, OrderedIterator start, OrderedIterator finish, NodeOperation newNode)
template<class NaviType >
void dd_print (NaviType navi)
 Function templates for debugging, prints dd indices and reference counts.
template<class IteratorType , class SizeType >
SizeType limited_distance (IteratorType start, IteratorType finish, SizeType limit)
template<class NaviType , class DDType >
DDType dd_minimal_elements (NaviType navi, DDType dd, DDType &multiples)
template<class MgrType >
const MgrType & get_mgr_core (const MgrType &rhs)
Cudd * get_mgr_core (const Cudd &rhs)
CCuddInterface::mgrcore_ptr get_mgr_core (const CCuddInterface &mgr)
template<class ManagerType , class ReverseIterator , class MultReverseIterator >
manager_traits< ManagerType >
::dd_base 
cudd_generate_multiples (const ManagerType &mgr, ReverseIterator start, ReverseIterator finish, MultReverseIterator multStart, MultReverseIterator multFinish)
 temporarily (needs to be more generic)
template<class ManagerType , class ReverseIterator >
manager_traits< ManagerType >
::dd_base 
cudd_generate_divisors (const ManagerType &mgr, ReverseIterator start, ReverseIterator finish)
 temporarily (needs to be more generic)
template<class Iterator , class SizeType >
Iterator bounded_max_element (Iterator start, Iterator finish, SizeType bound)
template<class LhsType , class RhsType , class BinaryPredicate >
CTypes::comp_type generic_compare_3way (const LhsType &lhs, const RhsType &rhs, BinaryPredicate comp)
 defines lexicographic comparison for variable indices
template<class IteratorLike , class ForwardIteratorTag >
IteratorLike increment_iteratorlike (IteratorLike iter, ForwardIteratorTag)
template<class IteratorLike >
IteratorLike increment_iteratorlike (IteratorLike iter, navigator_tag)
template<class IteratorLike >
IteratorLike increment_iteratorlike (IteratorLike iter)
template<class NaviType >
bool dd_is_singleton (NaviType navi)
template<class NaviType , class BooleConstant >
BooleConstant dd_pair_check (NaviType navi, BooleConstant allowSingleton)
template<class NaviType >
bool dd_is_singleton_or_pair (NaviType navi)
template<class NaviType >
bool dd_is_pair (NaviType navi)
template<class SetType >
void combine_sizes (const SetType &bset, double &init)
template<class SetType >
void combine_sizes (const SetType &bset, typename SetType::size_type &init)
template<class SizeType , class IdxType , class NaviType , class SetType >
SizeType & count_index (SizeType &size, IdxType idx, NaviType navi, const SetType &init)
template<class SizeType , class IdxType , class SetType >
SizeType & count_index (SizeType &size, IdxType idx, const SetType &bset)

Detailed Description

Author:
Alexander Dreyer
Date:
2006-04-07

This file includes some templates of simple transformations and similar procedures.

Note:
This file carries pure template routines. Algorithms, which make explicite use of PolyBoRi classes can be found in pbori_algorithms.h
Copyright:
(c) 2006 by The PolyBoRi Team

Function Documentation

template<class Iterator , class SizeType >
Iterator bounded_max_element ( Iterator  start,
Iterator  finish,
SizeType  bound 
) [inline]
template<class SetType >
void combine_sizes ( const SetType &  bset,
typename SetType::size_type &  init 
) [inline]
template<class SetType >
void combine_sizes ( const SetType &  bset,
double &  init 
) [inline]

Referenced by count_index().

template<class SizeType , class IdxType , class SetType >
SizeType& count_index ( SizeType &  size,
IdxType  idx,
const SetType &  bset 
) [inline]

References count_index().

template<class SizeType , class IdxType , class NaviType , class SetType >
SizeType& count_index ( SizeType &  size,
IdxType  idx,
NaviType  navi,
const SetType &  init 
) [inline]

References combine_sizes().

Referenced by count_index().

template<class ManagerType , class ReverseIterator >
manager_traits<ManagerType>::dd_base cudd_generate_divisors ( const ManagerType &  mgr,
ReverseIterator  start,
ReverseIterator  finish 
) [inline]

temporarily (needs to be more generic)

Todo:
Next line needs generalization

References get_mgr_core().

Referenced by BooleExponent::divisors(), and CDDInterface< CuddLikeZDD >::firstDivisors().

template<class ManagerType , class ReverseIterator , class MultReverseIterator >
manager_traits<ManagerType>::dd_base cudd_generate_multiples ( const ManagerType &  mgr,
ReverseIterator  start,
ReverseIterator  finish,
MultReverseIterator  multStart,
MultReverseIterator  multFinish 
) [inline]

temporarily (needs to be more generic)

References get_mgr_core().

Referenced by CDDInterface< CuddLikeZDD >::firstMultiples(), and BooleExponent::multiples().

template<class NaviType , class TermType , class TernaryOperator , class TerminalOperator >
BEGIN_NAMESPACE_PBORI TermType dd_backward_transform ( NaviType  navi,
TermType  init,
TernaryOperator  newNode,
TerminalOperator  terminate 
) [inline]

Function templates for transforming decision diagrams.

Referenced by translate_indices().

template<class NaviType , class OrderedIterator , class NodeOperation >
NaviType dd_intersect_some_index ( NaviType  navi,
OrderedIterator  start,
OrderedIterator  finish,
NodeOperation  newNode 
) [inline]

Function templates extracting the terms of a given decision diagram contain which contains only indices from the range [start, finish) Note: Returns incremented node

template<class NaviType >
bool dd_is_pair ( NaviType  navi  )  [inline]
template<class NaviType >
bool dd_is_singleton ( NaviType  navi  )  [inline]
template<class NaviType >
bool dd_is_singleton_or_pair ( NaviType  navi  )  [inline]
template<class NaviType , class DDType >
DDType dd_minimal_elements ( NaviType  navi,
DDType  dd,
DDType &  multiples 
) [inline]

A first version Function templates extracting minimal elements of dd wrt. inclusion Assumption, navi is navigator of dd

Referenced by dd_minimal_elements().

template<class NaviType >
bool dd_on_path ( NaviType  navi  )  [inline]

Function templates for checking whether a given decision diagram node is on path

template<class NaviType , class OrderedIterator >
bool dd_owns_term_of_indices ( NaviType  navi,
OrderedIterator  start,
OrderedIterator  finish 
) [inline]

Function templates for checking whether a given decision diagram contains paths with indices only in range [start, finish)

template<class NaviType , class BooleConstant >
BooleConstant dd_pair_check ( NaviType  navi,
BooleConstant  allowSingleton 
) [inline]

References dd_is_singleton().

Referenced by dd_is_pair(), and dd_is_singleton_or_pair().

template<class NaviType >
void dd_print ( NaviType  navi  )  [inline]

Function templates for debugging, prints dd indices and reference counts.

template<class NaviType , class TermType , class OutIterator , class ThenBinaryOperator >
void dd_transform ( const NaviType &  navi,
const TermType &  init,
const OutIterator &  result,
const ThenBinaryOperator &  then_binop 
) [inline]

Function templates for transforming decision diagrams.

References dd_transform().

template<class NaviType , class TermType , class OutIterator , class ThenBinaryOperator , class ElseBinaryOperator >
void dd_transform ( const NaviType &  navi,
const TermType &  init,
const OutIterator &  result,
const ThenBinaryOperator &  then_binop,
const ElseBinaryOperator &  else_binop 
) [inline]

Function templates for transforming decision diagrams.

References dd_transform().

template<class NaviType , class TermType , class OutIterator , class ThenBinaryOperator , class ElseBinaryOperator , class TerminalOperator , class FirstTermOp >
OutIterator dd_transform ( NaviType  navi,
TermType  init,
OutIterator  result,
ThenBinaryOperator  then_binop,
ElseBinaryOperator  else_binop,
TerminalOperator  terminate,
FirstTermOp  terminate_first 
) [inline]

Function templates for transforming decision diagrams with special treatment of the leading term

References dd_transform().

template<class NaviType , class TermType , class OutIterator , class ThenBinaryOperator , class ElseBinaryOperator , class TerminalOperator >
OutIterator dd_transform ( NaviType  navi,
TermType  init,
OutIterator  result,
ThenBinaryOperator  then_binop,
ElseBinaryOperator  else_binop,
TerminalOperator  terminate 
) [inline]

Function templates for transforming decision diagrams.

Referenced by dd_transform().

template<class LhsType , class RhsType , class BinaryPredicate >
CTypes::comp_type generic_compare_3way ( const LhsType &  lhs,
const RhsType &  rhs,
BinaryPredicate  comp 
) [inline]
CCuddInterface::mgrcore_ptr get_mgr_core ( const CCuddInterface mgr  )  [inline]
Todo:
merge with extract_manager

References CCuddInterface::managerCore().

Cudd* get_mgr_core ( const Cudd &  rhs  )  [inline]
template<class MgrType >
const MgrType& get_mgr_core ( const MgrType &  rhs  )  [inline]
template<class IteratorLike >
IteratorLike increment_iteratorlike ( IteratorLike  iter  )  [inline]
template<class IteratorLike >
IteratorLike increment_iteratorlike ( IteratorLike  iter,
navigator_tag   
) [inline]
template<class IteratorLike , class ForwardIteratorTag >
IteratorLike increment_iteratorlike ( IteratorLike  iter,
ForwardIteratorTag   
) [inline]

Referenced by increment_iteratorlike().

template<class IteratorType , class SizeType >
SizeType limited_distance ( IteratorType  start,
IteratorType  finish,
SizeType  limit 
) [inline]
template<class InputIterator , class Intermediate , class OutputIterator >
OutputIterator reversed_inter_copy ( InputIterator  start,
InputIterator  finish,
Intermediate &  inter,
OutputIterator  output 
) [inline]

Function templates doing a reversed copy using intermediate storage.

Referenced by dd_last_lexicographical_term(), BoolePolynomial::firstDivisors(), and LexOrder::lead().

template<class InputIterator , class OutputIterator , class FirstFunction , class UnaryFunction >
OutputIterator special_first_transform ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
UnaryFunction  op,
FirstFunction  firstop 
) [inline]
Generated on Tue May 4 08:39:34 2010 for PolyBoRi by  doxygen 1.6.3