|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Combinatorics utilities: permutations, combinations and matrix transposition. More...
#include <htlist.H>#include <tpl_dynDlist.H>#include <tpl_dynArray.H>#include <tpl_array.H>#include <tpl_dynSetTree.H>#include <ahSort.H>Go to the source code of this file.
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
Functions | |
| template<typename T > | |
| DynList< DynList< T > > | Aleph::transpose (const DynList< DynList< T > > &l) |
| Transpose a matrix represented as a list of lists. | |
| template<template< typename > class C, typename T > | |
| void | Aleph::in_place_transpose (C< C< T > > &l) |
| In-place transpose of a rectangular matrix stored as a nested container. | |
| template<typename T > | |
| void | Aleph::in_place_transpose (DynList< DynList< T > > &l) |
In-place transpose of a matrix stored as DynList<DynList<T>>. | |
| template<typename T , class Op > | |
| bool | Aleph::traverse_perm (const DynList< DynList< T > > &l, Op &op) |
| Traverse all the possible permutations that can be done of a list of lists and on each permutation performs an operation. | |
| template<typename T , class Op > | |
| bool | Aleph::traverse_perm (const DynList< DynList< T > > &l, Op &&op) |
| template<typename T , class Op > | |
| void | Aleph::for_each_perm (const DynList< DynList< T > > &l, Op &op) |
Apply a procedure to every permutation produced by traverse_perm. | |
| template<typename T , class Op > | |
| void | Aleph::for_each_perm (const DynList< DynList< T > > &l, Op &&op) |
| template<typename T > | |
| DynList< DynList< T > > | Aleph::build_perms (const DynList< DynList< T > > &l) |
| Materialize all permutations from a list of lists. | |
| template<typename T > | |
| DynList< DynList< T > > | Aleph::build_combs (const DynList< DynList< T > > &l) |
| Build the set of unique combinations from a list of lists. | |
| template<typename T , typename Tc , class Op = Dft_Fold_Op<Tc, T>> | |
| T | Aleph::fold_perm (const T &init, const DynList< DynList< Tc > > &l, Op &op) |
| Left-fold over all permutations. | |
| template<typename T , typename Tc , class Op = Dft_Fold_Op<Tc, T>> | |
| T | Aleph::fold_perm (const T &init, const DynList< DynList< Tc > > &l, Op &&op) |
| template<typename T > | |
| size_t | Aleph::perm_count (const DynList< DynList< T > > &l) |
| Count the total number of permutations from a list of lists. | |
| template<typename T , class Pred > | |
| bool | Aleph::exists_perm (const DynList< DynList< T > > &l, Pred &pred) |
| Check if any permutation satisfies a predicate. | |
| template<typename T , class Pred > | |
| bool | Aleph::exists_perm (const DynList< DynList< T > > &l, Pred &&pred) |
| template<typename T , class Pred > | |
| bool | Aleph::all_perm (const DynList< DynList< T > > &l, Pred &pred) |
| Check if all permutations satisfy a predicate. | |
| template<typename T , class Pred > | |
| bool | Aleph::all_perm (const DynList< DynList< T > > &l, Pred &&pred) |
| template<typename T , class Pred > | |
| bool | Aleph::none_perm (const DynList< DynList< T > > &l, Pred &pred) |
| Check if no permutation satisfies a predicate. | |
| template<typename T , class Pred > | |
| bool | Aleph::none_perm (const DynList< DynList< T > > &l, Pred &&pred) |
| template<typename T , class Pred > | |
| DynList< DynList< T > > | Aleph::filter_perm (const DynList< DynList< T > > &l, Pred &pred) |
| Filter permutations that satisfy a predicate. | |
| template<typename T , class Pred > | |
| DynList< DynList< T > > | Aleph::filter_perm (const DynList< DynList< T > > &l, Pred &&pred) |
| template<typename R , typename T , class Op > | |
| DynList< R > | Aleph::map_perm (const DynList< DynList< T > > &l, Op &op) |
| Transform each permutation via a mapping operation. | |
| template<typename R , typename T , class Op > | |
| DynList< R > | Aleph::map_perm (const DynList< DynList< T > > &l, Op &&op) |
Combinatorics utilities: permutations, combinations and matrix transposition.
This header provides functions to:
transpose, in_place_transpose).traverse_perm, for_each_perm, build_perms).build_combs).fold_perm).perm_count).exists_perm, all_perm).Definition in file ah-comb.H.