All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Pages
Namespaces | Classes | Typedefs | Enumerations | Functions
paal Namespace Reference

global namespace of project. More...

Namespaces

 auctions
 Auctions namespace.
 
 data_structures
 Data Structure namespace.
 
 detail
 Detail namespace.
 
 greedy
 Greedy namespace.
 
 hash
 Hash functions namespace.
 
 ir
 Iterative Rounding namespace.
 
 
 lp
 Linear Programming namespace.
 
 utils
 Utils namespace.
 

Classes

struct  k_means_visitor
 k means visitor More...
 
class  thread_pool
 simple threadpool, class uses also current thread! More...
 
class  distance_oracle_thorup2kminus1approximation
 2k-1 approximate distance oracle More...
 
class  hash_function_tuple
 functor representing tuple of hash functions More...
 
class  hash_function_tuple_generator
 
class  lsh_nearest_neighbors_regression
 detail More...
 
class  frequent_directions
 Represents sketch of matrix. More...
 
class  dreyfus_wagner
 
class  average_accumulator
 helper class facilitating counting average More...
 
class  subset_backtrack
 detail More...
 
struct  edge_hash
 hash for edge_descriptor in bgl, undirected version More...
 
struct  edge_hash< Graph, typename std::enable_if< std::is_same< typename boost::graph_traits< Graph >::directed_category, boost::directed_tag >::value >::type >
 hash for edge_descriptor in bgl, directed version More...
 
struct  range_hash
 Functor that can be used as a std::unordered_map/set hash param, when key is a range. copied from: http://stackoverflow.com/questions/10405030/c-unordered-map-fail-when-used-with-a-vector-as-key. More...
 
struct  density
 density functor, for given value and size More...
 
struct  less_pointees_t
 compare pointee using comparator More...
 
struct  make_tuple
 function object for std::make_tuple More...
 
struct  pretty_stream
 pretty_stream stream that uses pretty_to_string method More...
 

Typedefs

using RestrictionsVector = std::vector< std::pair< unsigned, unsigned >>
 
using default_hash_function_generator = lsh::hamming_hash_function_generator
 
using minus_infinity = detail::infinity< false >
 detail
 
using plus_infinity = detail::infinity< true >
 
template<typename T >
using decay_t = typename std::decay< T >::type
 short version of std::decay
 
template<typename Range >
using range_to_ref_t = typename boost::range_reference< Range >::type
 for given range returns type of its reference
 
template<typename Range >
using range_to_elem_t = typename boost::range_value< Range >::type
 for given range returns type of its element
 
template<typename Range >
using range_to_diff_type_t = typename boost::range_difference< Range >::type
 for given collection returns its difference type
 
template<typename T , int k>
using k_tuple_t = typename detail::k_tuple< T, k >::type
 returns tuple consisting of k times type T
 
template<class F >
using pure_result_of_t = typename std::decay< typename std::result_of< F >::type >::type
 return pure type of function (decays const and reference)
 
template<typename T1 , typename T2 >
using promote_with_t = puretype(std::declval< T1 >()+std::declval< T2 >())
 return type obtained after adding values of given types
 
template<typename T >
using promote_with_double_t = promote_with_t< T, double >
 return type after promotion with double
 

Enumerations

enum  Terminals { NONTERMINAL, TERMINAL }
 enum indicates if given color represents terminal or NONTERMINAL.
 

Functions

template<typename Cluster , typename OutputIterator >
void centroid_minimalize_w_c_s_s (Cluster &&cluster, OutputIterator out)
 return centroid that minimize within-cluster sum of squares
 
template<typename Clusters , typename OutputIterator >
void centroids_minimalize_w_c_s_s (Clusters &&clusters, OutputIterator out)
 centroid minimize within cluster sum of squares More...
 
template<typename Points , class Centers , class OutputIterator , class Visitor = k_means_visitor>
auto k_means (Points &&points, Centers &&centers, OutputIterator result, Visitor visitor=Visitor{})
 this is solve k_means_clustering problem and return vector of cluster example:

#include <vector>
#include <iostream>
int main() {
using Point = std::vector<double>;
// sample data
unsigned const int NUMBER_OF_CLUSTER = 2;
std::vector<Point> points = { { 0, 0 },
{ 0, 3 },
{ 4, 0 } };
std::vector<std::pair<Point , int>> point_cluster_pair;
std::vector<Point> centers(NUMBER_OF_CLUSTER);
// solution
paal::get_random_centers(points, NUMBER_OF_CLUSTER, centers.begin());
paal::k_means(points , centers,
back_inserter(point_cluster_pair));
for (auto i : point_cluster_pair) {
for(auto && j : i.first) {
std::cout << j << ",";
}
std::cout<< " " << i.second << std::endl;
}
More...
 
template<class RangeLeft , class RangeRight >
auto distance_square (RangeLeft &&lrange, RangeRight &&rrange)
 
template<class Point , class Centers >
auto closest_to (Point &&point, Centers &&centers)
 
template<class Points , class Centers , class Centroid , class ClosestTo , class OutputIterator , class CentroidEqual = utils::equal_to, class Visitor = k_means_visitor>
auto k_means (Points &&points, Centers &centers, Centroid centroid, ClosestTo closest_to, OutputIterator result, CentroidEqual c_equal=CentroidEqual{}, Visitor visitor=Visitor{})
 
template<typename Points , typename OutputIterator , typename RNG = std::default_random_engine>
auto get_random_centers (Points &&points, int number_of_centers, OutputIterator out, RNG &&rng=std::default_random_engine{})
 
template<typename Points , typename RNG = std::default_random_engine>
auto get_random_clusters (Points &&points, int number_of_clusters, RNG &&rng=std::default_random_engine{})
 
template<typename Metric , typename Cycle >
Metric::DistanceType get_cycle_length (const Metric &m, const Cycle &cm)
 computes length of the cycle More...
 
template<typename Cycle , typename Stream >
void print_cycle (const Cycle &cm, Stream &o, const std::string &endl="\n")
 pints cycle to std out
 
template<typename Graph , typename EdgeWeightMap , typename VertexIndexMap , typename Rand = std::default_random_engine>
distance_oracle_thorup2kminus1approximation
< Graph, VertexIndexMap,
EdgeWeightMap, Rand > 
make_distance_oracle_thorup2kminus1approximation (const Graph &g, const int k, VertexIndexMap index, EdgeWeightMap edge_weight, Rand &&random_engine=Rand(5426u))
 
template<typename Graph , typename P = char, typename T = boost::detail::unused_tag_type, typename R = boost::no_property, typename Rand = std::default_random_engine>
auto make_distance_oracle_thorup2kminus1approximation (const Graph &g, const int k, const boost::bgl_named_params< P, T, R > &params=boost::no_named_parameters(), Rand &&random_engine=Rand(5426u)) -> distance_oracle_thorup2kminus1approximation< Graph, decltype(choose_const_pmap(get_param(params, boost::vertex_index), g, boost::vertex_index)), decltype(choose_const_pmap(get_param(params, boost::edge_weight), g, boost::edge_weight)), Rand >
 
template<typename ValueIterator , typename Objects , typename ObjectSizeFunctor , typename Combine , typename Compare , typename Init , typename GetPositionRange >
detail::FunctorOnRangePValue
< ObjectSizeFunctor, Objects > 
fill_knapsack_dynamic_table (ValueIterator valuesBegin, ValueIterator valuesEnd, Objects &&objects, ObjectSizeFunctor size, Combine combine, Compare compare, Init init, GetPositionRange get_range)
 Computes dynamic algorithm table (valuesBegin, valuesEnd) The values collection has element type ValueOrNull, The default constructed ValueOrNull should represent empty object. This collection is filled using init, compare and combine functors. More...
 
template<typename Objects , typename OutputIterator , typename ObjectSizeFunctor , typename ObjectValueFunctor = utils::return_one_functor>
auto knapsack_0_1 (Objects &&objects, detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects > capacity, OutputIterator out, ObjectSizeFunctor size, ObjectValueFunctor value=ObjectValueFunctor{})
 Solution to Knapsack 0/1 problem. More...
 
template<typename Objects , typename ObjectSizeFunctor , typename ObjectValueFunctor = utils::return_one_functor>
auto knapsack_0_1_no_output (Objects &&objects, detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects > capacity, ObjectSizeFunctor size, ObjectValueFunctor value=ObjectValueFunctor{})
 Solution to Knapsack 0/1 problem, without retrieving the objects in the solution. More...
 
template<typename OutputIterator , typename Objects , typename ObjectSizeFunctor , typename ObjectValueFunctor >
detail::knapsack_base< Objects,
ObjectSizeFunctor,
ObjectValueFunctor >
::return_type 
knapsack_0_1_on_value_fptas (double epsilon, Objects &&objects, detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects > capacity, OutputIterator out, ObjectSizeFunctor size, ObjectValueFunctor value)
 
template<typename OutputIterator , typename Objects , typename ObjectSizeFunctor , typename ObjectValueFunctor >
detail::knapsack_base< Objects,
ObjectSizeFunctor,
ObjectValueFunctor >
::return_type 
knapsack_0_1_on_size_fptas (double epsilon, Objects &&objects, detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects > capacity, OutputIterator out, ObjectSizeFunctor size, ObjectValueFunctor value)
 
template<typename Objects , typename ObjectSizeFunctor , typename ObjectValueFunctor >
detail::knapsack_base< Objects,
ObjectSizeFunctor,
ObjectValueFunctor >
::return_type 
knapsack_0_1_no_output_on_value_fptas (double epsilon, Objects &&objects, detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects > capacity, ObjectSizeFunctor size, ObjectValueFunctor value)
 
template<typename Objects , typename ObjectSizeFunctor , typename ObjectValueFunctor >
detail::knapsack_base< Objects,
ObjectSizeFunctor,
ObjectValueFunctor >
::return_type 
knapsack_0_1_no_output_on_size_fptas (double epsilon, Objects &&objects, detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects > capacity, ObjectSizeFunctor size, ObjectValueFunctor value)
 
template<typename Objects , typename OutputIterator , typename ObjectSizeFunctor , typename ObjectValueFunctor = utils::return_one_functor>
detail::knapsack_base< Objects,
ObjectSizeFunctor,
ObjectValueFunctor >
::return_type 
knapsack_unbounded (Objects &&objects, detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects > capacity, OutputIterator out, ObjectSizeFunctor size, ObjectValueFunctor value=ObjectValueFunctor())
 Solution to the knapsack problem. More...
 
template<typename OutputIterator , typename Objects , typename ObjectSizeFunctor , typename ObjectValueFunctor >
detail::knapsack_base< Objects,
ObjectSizeFunctor,
ObjectValueFunctor >
::return_type 
knapsack_unbounded_on_value_fptas (double epsilon, Objects &&objects, detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects > capacity, OutputIterator out, ObjectSizeFunctor size, ObjectValueFunctor value)
 
template<typename OutputIterator , typename Objects , typename ObjectSizeFunctor , typename ObjectValueFunctor >
detail::knapsack_base< Objects,
ObjectSizeFunctor,
ObjectValueFunctor >
::return_type 
knapsack_unbounded_on_size_fptas (double epsilon, Objects &&objects, detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects > capacity, OutputIterator out, ObjectSizeFunctor size, ObjectValueFunctor value)
 
template<typename OutputIterator , typename Objects , typename ObjectSizeFunctor , typename ObjectValueFunctor , typename std::enable_if< !detail::is_range_const< Objects >::value >::type * = nullptr>
detail::knapsack_base< Objects,
ObjectSizeFunctor,
ObjectValueFunctor >
::return_type 
knapsack_0_1_two_app (Objects &&objects, typename detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects > capacity, OutputIterator out, ObjectValueFunctor value, ObjectSizeFunctor size)
 detail More...
 
template<typename OutputIterator , typename Objects , typename ObjectSizeFunctor , typename ObjectValueFunctor , typename std::enable_if<!detail::is_range_const< Objects >::value >::type * = nullptr>
detail::knapsack_base< Objects,
ObjectSizeFunctor,
ObjectValueFunctor >
::return_type 
knapsack_unbounded_two_app (Objects &&objects, typename detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects > capacity, OutputIterator out, ObjectValueFunctor value, ObjectSizeFunctor size)
 detail More...
 
template<typename Graph , typename OutputIterator , typename EdgeWeightMap , typename ColorMap >
auto steiner_tree_greedy (const Graph &g, OutputIterator out, EdgeWeightMap edge_weight, ColorMap color_map) -> typename std::pair< typename boost::property_traits< EdgeWeightMap >::value_type, typename boost::property_traits< EdgeWeightMap >::value_type >
 non-named version of steiner_tree_greedy More...
 
template<typename Graph , typename OutputIterator , typename P , typename T , typename R >
auto steiner_tree_greedy (const Graph &g, OutputIterator out, const boost::bgl_named_params< P, T, R > &params)
 named version of steiner_tree_greedy More...
 
template<typename Graph , typename OutputIterator >
auto steiner_tree_greedy (const Graph &g, OutputIterator out)
 version of steiner_tree_greedy with all default parameters More...
 
template<typename Restrictions >
RestrictionsVector prune_restrictions_to_tree (Restrictions res, int N)
 Returns a list of restrictions, made of the edges of a maximum spanning tree in a clique with edge weights equal to restriction values between the edges. More...
 
template<typename Rand = std::default_random_engine, typename Distribution = std::uniform_real_distribution<double>, typename LP = lp::glp, typename Graph , typename OutputIterator , typename P , typename T , typename R >
auto multiway_cut (const Graph &g, OutputIterator out, const boost::bgl_named_params< P, T, R > &params, Rand &&random_engine=std::default_random_engine(5426u)) -> typename boost::property_traits< puretype(boost::choose_const_pmap(get_param(params, boost::edge_weight), g, boost::edge_weight))>::value_type
 detail More...
 
template<typename Rand = std::default_random_engine, typename Distribution = std::uniform_real_distribution<double>, typename LP = lp::glp, typename Graph , class OutputIterator >
auto multiway_cut (const Graph &graph, OutputIterator result, Rand random_engine=std::default_random_engine(5426u)) -> detail::CostType< Graph >
 this is solve multiway_cut problem and return cut_cost example:

#include <boost/graph/adjacency_list.hpp>
int main() {
// sample data
std::vector<std::pair<int,int>> edges_p{{0,3},{1,3},
{0,4},{2,4},
{1,5},{2,5},
{3,6},{4,6},
{3,7},{5,7},
{4,8},{5,8},
{6,7},{6,8},{7,8}
};
const int vertices_num = 9;
std::vector<int> cost_edges{100,100,100,100,100,100,10,10,10,10,10,10,1,1,1};
std::vector<int> terminals = { 0, 1, 2 };
boost::adjacency_list<
boost::vecS, boost::vecS, boost::undirectedS,
boost::property<boost::vertex_index_t, int,
boost::property<boost::vertex_color_t, int>>,
boost::property<boost::edge_weight_t, int>
> graph(edges_p.begin(), edges_p.end(), cost_edges.begin(), vertices_num);
for (std::size_t i = 1; i <= terminals.size(); ++i) {
put(boost::vertex_color, graph, terminals[i - 1], i);
}
//solve
std::vector<std::pair<int,int>> vertices_parts;
auto cost_cut = paal::multiway_cut(graph, back_inserter(vertices_parts));
//print result
std::cout << "cost cut: " << cost_cut << std::endl;
std::cout << "vertices (part)" << std::endl;
for(auto i: vertices_parts) {
std::cout << " " << i.first << " ( " << i.second << " )" << std::endl;
}
paal::lp::glp::free_env();
}
More...
 
template<typename FunctionGenerator >
auto make_hash_function_tuple_generator (FunctionGenerator &&function_generator, unsigned hash_functions_per_point)
 
template<typename TrainingPoints , typename TrainingResults , typename LshFunctionGenerator >
auto make_lsh_nearest_neighbors_regression (TrainingPoints &&training_points, TrainingResults &&training_results, unsigned passes, LshFunctionGenerator &&lsh_function_generator, unsigned threads_count=std::thread::hardware_concurrency())
 this is the most general version of the make_lsh_nearest_neighbors_regression, It takes any hash function generator. More...
 
template<typename TrainingPoints , typename TrainingResults , typename FunctionGenerator >
auto make_lsh_nearest_neighbors_regression_tuple_hash (TrainingPoints &&training_points, TrainingResults &&training_results, unsigned passes, FunctionGenerator &&function_generator, unsigned hash_functions_per_point, unsigned threads_count=std::thread::hardware_concurrency())
 This is the special version of make_lsh_nearest_neighbors_regression. This version assumes that hash function is concatenation (tuple) of several hash functions. In this function user provide Function generator for the inner functions only. More...
 
template<typename Matrix >
auto make_frequent_directions (Matrix matrix)
 make for frequent_directions
 
template<typename Matrix >
auto make_frequent_directions (Matrix matrix, std::size_t const compress_size)
 make for frequent_directions with compress_size
 
template<typename CoordinateType >
auto make_frequent_directions (std::size_t rows_count, std::size_t columns_count)
 make for frequent_directions using default matrix
 
template<typename CoordinateType >
auto make_frequent_directions (std::size_t rows_count, std::size_t columns_count, std::size_t const compress_size)
 make for frequent_directions using default matrix and compress_size
 
template<unsigned int TerminalsLimit = 32, typename Metric , typename Terminals , typename NonTerminals >
dreyfus_wagner< Metric,
Terminals, NonTerminals,
TerminalsLimit > 
make_dreyfus_wagner (const Metric &metric, const Terminals &terminals, const NonTerminals &non_terminals)
 Creates a dreyfus_wagner object. More...
 
template<typename Metric , typename Voronoi , typename OutputIterator >
void steiner_tree_zelikovsky11per6approximation (const Metric &m, const Voronoi &v, OutputIterator out)
 11/6 approximation for steiner_tree problem More...
 
template<typename Range , typename T , typename Functor , typename BinaryOperation = utils::plus>
accumulate_functor (const Range &rng, T init, Functor f, BinaryOperation bin_op=BinaryOperation{})
 combination of boost::accumulate and boost::adaptors::transformed
 
template<typename Range , typename Functor >
auto sum_functor (const Range &rng, Functor f)
 sum of functor values over the range elements
 
template<typename Range , typename Functor >
auto max_element_functor (Range &&range, Functor f)
 combination of boost::max_element and boost::adaptors::transformed
 
template<typename Range , typename Functor >
auto min_element_functor (Range &&range, Functor f)
 combination of boost::min_element and boost::adaptors::transformed
 
template<class Elements >
auto make_subset_backtrack (const Elements &elements)
 make subset_backtrack
 
template<typename Letter >
void lcp (std::vector< int > const &suffix_array, std::vector< int > const &rank, std::vector< int > &lcp, std::vector< Letter > const &sumWords)
 fill array lcp lcp[0] is undefined and lcp[i] stores the largest common prefix of the lexicographically i-1'th smallest suffix and its predecessor in the suffix array More...
 
template<typename Letter >
void suffix_array (std::vector< Letter > &text, std::vector< int > &SA, Letter max_letter=0)
 detail More...
 
template<typename T >
void assign_max (T &t, const T &u)
 
template<typename T >
void assign_min (T &t, const T &u)
 
float fast_pow2 (float p)
 fast Power of 2 More...
 
float fast_exp (float p)
 fast power of e. More...
 
template<typename T >
auto irange (T begin, T end)
 irange More...
 
template<typename T >
auto irange (T end)
 irange More...
 
template<typename Value , typename Size >
density< Value, Size > make_density (Value value, Size size)
 make for density More...
 
template<class Comparator >
less_pointees_t< Comparator > make_less_pointees_t (Comparator compare)
 make function for less_pointees_t More...
 
template<typename Range , typename Element = range_to_elem_t<Range>>
auto make_unordered_set (Range const &r)
 make for unordered_set
 
template<typename Functor >
void parse (std::istream &input_stream, Functor f)
 parses stream ignoring empty lines or beginning with '#' More...
 
template<typename Functor >
void parse (const std::string &filename, Functor f)
 additional version of parse function More...
 
template<typename FloatType = double, typename Probs , typename TestResults >
FloatType log_loss (Probs &&probs, TestResults &&test_results)
 
template<typename FloatType >
FloatType likelihood_from_log_loss (FloatType log_loss)
 
template<typename FloatType = double, typename Probs , typename TestResults >
FloatType likelihood (Probs &&probs, TestResults &&test_results)
 
template<typename FloatType = double, typename Probs , typename TestResults >
FloatType mean_absolute_error (Probs &&probs, TestResults &&test_results)
 
std::string pretty_to_string (double x, double epsilon=1e-9)
 pretty_to_string prints double which is close to int as int More...
 
template<typename T >
std::string pretty_to_string (T &&t)
 generic version of pretty_to_string More...
 
template<typename Stream >
pretty_stream< Stream > make_pretty_stream (Stream &s, double epsilon=1e-9)
 make for pretty_stream More...
 
template<typename Range , typename Stream >
void print_collection (Stream &o, Range &&r, const std::string &del)
 prints collection with delimiters without trailing delimiter More...
 
template<typename Matrix , typename Stream >
void print_matrix (Stream &o, Matrix &&m, const std::string &del)
 prints matrix with delimiters More...
 
template<typename CoordinateType , typename RowType = std::vector<CoordinateType>, typename ShouldIgnoreBadRow = utils::always_true>
void read_rows (std::istream &input_stream, std::vector< RowType > &rows, std::size_t row_size, std::size_t max_rows_to_read, ShouldIgnoreBadRow &&should_ignore_bad_row=ShouldIgnoreBadRow{})
 reads up to max_rows_to_read rows of size row_size More...
 
template<typename CoordinateType , typename RowType = std::vector<CoordinateType>, typename ShouldIgnoreBadRow = utils::always_true, typename FailureMessage = utils::failure_message>
void read_rows_first_row_size (std::istream &input_stream, std::vector< RowType > &rows, std::size_t max_rows_to_read, ShouldIgnoreBadRow &&should_ignore_bad_row=ShouldIgnoreBadRow{}, FailureMessage &&failure_message=FailureMessage{})
 reads up to max_rows_to_read rows, size is determine by first row More...
 
template<typename RowType , typename ResultType = int, typename ShouldIgnoreBadRow = utils::always_false>
void read_svm (std::istream &input_stream, std::size_t &max_dimensions, std::vector< std::tuple< RowType, ResultType >> &points, std::size_t max_points_to_read, ShouldIgnoreBadRow &&should_ignore_bad_row=ShouldIgnoreBadRow{})
 detail More...
 
template<typename RowType , typename ResultType = int>
auto read_svm (std::istream &input_stream)
 Function parses svm stream of format: More...
 

Detailed Description

global namespace of project.

Function Documentation

template<typename T >
void paal::assign_max ( T &  t,
const T &  u 
)

removes boilerplate for x = max(x,y). it becomes assign_max(x, y)

Definition at line 18 of file assign_updates.hpp.

template<typename T >
void paal::assign_min ( T &  t,
const T &  u 
)

removes boilerplate for x = min(x,y). it becomes assign_min(x, y)

Definition at line 25 of file assign_updates.hpp.

template<typename Clusters , typename OutputIterator >
void paal::centroids_minimalize_w_c_s_s ( Clusters &&  clusters,
OutputIterator  out 
)

centroid minimize within cluster sum of squares

Parameters
clusters
out
Template Parameters
Clusters
OutputIterator

Definition at line 49 of file k_means_clustering.hpp.

template<class Point , class Centers >
auto paal::closest_to ( Point &&  point,
Centers &&  centers 
)
Parameters
point
centers
Template Parameters
Point
Centers

Definition at line 53 of file k_means_clustering_engine.hpp.

template<class RangeLeft , class RangeRight >
auto paal::distance_square ( RangeLeft &&  lrange,
RangeRight &&  rrange 
)
Parameters
lrange
rrange
Template Parameters
RangeLeft
RangeRight

Definition at line 33 of file k_means_clustering_engine.hpp.

float paal::fast_exp ( float  p)
inline

fast power of e.

Parameters
p
Returns

Definition at line 47 of file fast_exp.hpp.

float paal::fast_pow2 ( float  p)
inline

fast Power of 2

Parameters
p
Returns

Definition at line 31 of file fast_exp.hpp.

template<typename ValueIterator , typename Objects , typename ObjectSizeFunctor , typename Combine , typename Compare , typename Init , typename GetPositionRange >
detail::FunctorOnRangePValue<ObjectSizeFunctor, Objects> paal::fill_knapsack_dynamic_table ( ValueIterator  valuesBegin,
ValueIterator  valuesEnd,
Objects &&  objects,
ObjectSizeFunctor  size,
Combine  combine,
Compare  compare,
Init  init,
GetPositionRange  get_range 
)

Computes dynamic algorithm table (valuesBegin, valuesEnd) The values collection has element type ValueOrNull, The default constructed ValueOrNull should represent empty object. This collection is filled using init, compare and combine functors.

Parameters
valuesBeginbegin of the table which will store the values for specific positions in dynamic algorithm computation
valuesEnd
objects- possible object collection
size- functor, for given opbjedt return its size
combine- for given Objects and value gives new object representing adding *Objects to value
compare- compares to values.
init- discover element and assign the 0 value
get_range
Template Parameters
ValueIteratorhas to be RandomAccess output iterator
Objects
ObjectSizeFunctor
Combine
Compare
Init
GetPositionRange

Definition at line 50 of file fill_knapsack_dynamic_table.hpp.

template<typename Metric , typename Cycle >
Metric::DistanceType paal::get_cycle_length ( const Metric &  m,
const Cycle &  cm 
)

computes length of the cycle

Template Parameters
Metric
Cycle
Parameters
m
cm
Returns

Definition at line 39 of file cycle_algo.hpp.

template<typename Points , typename OutputIterator , typename RNG = std::default_random_engine>
auto paal::get_random_centers ( Points &&  points,
int  number_of_centers,
OutputIterator  out,
RNG &&  rng = std::default_random_engine{} 
)
Parameters
points
number_of_centers
Template Parameters
Points

Definition at line 151 of file k_means_clustering_engine.hpp.

template<typename Points , typename RNG = std::default_random_engine>
auto paal::get_random_clusters ( Points &&  points,
int  number_of_clusters,
RNG &&  rng = std::default_random_engine{} 
)
Parameters
points
number_of_clusters
Template Parameters
Points

Definition at line 170 of file k_means_clustering_engine.hpp.

template<typename T >
auto paal::irange ( begin,
end 
)

irange

Template Parameters
T
Parameters
begin
end

Definition at line 22 of file irange.hpp.

template<typename T >
auto paal::irange ( end)

irange

Template Parameters
T
Parameters
end

Definition at line 32 of file irange.hpp.

template<typename Points , class Centers , class OutputIterator , class Visitor = k_means_visitor>
auto paal::k_means ( Points &&  points,
Centers &&  centers,
OutputIterator  result,
Visitor  visitor = Visitor{} 
)

this is solve k_means_clustering problem and return vector of cluster example:

#include <vector>
#include <iostream>
int main() {
using Point = std::vector<double>;
// sample data
unsigned const int NUMBER_OF_CLUSTER = 2;
std::vector<Point> points = { { 0, 0 },
{ 0, 3 },
{ 4, 0 } };
std::vector<std::pair<Point , int>> point_cluster_pair;
std::vector<Point> centers(NUMBER_OF_CLUSTER);
// solution
paal::get_random_centers(points, NUMBER_OF_CLUSTER, centers.begin());
paal::k_means(points , centers,
back_inserter(point_cluster_pair));
for (auto i : point_cluster_pair) {
for(auto && j : i.first) {
std::cout << j << ",";
}
std::cout<< " " << i.second << std::endl;
}

complete example is k_means_clustering_example.cpp

Parameters
points
centers
resultpairs of point and id of cluster (number form 0,1,2 ...,number_of_cluster-1)
visitor
Template Parameters
Points
OutputIterator
CoordinateType
Visitor

Definition at line 85 of file k_means_clustering.hpp.

template<class Points , class Centers , class Centroid , class ClosestTo , class OutputIterator , class CentroidEqual = utils::equal_to, class Visitor = k_means_visitor>
auto paal::k_means ( Points &&  points,
Centers &  centers,
Centroid  centroid,
ClosestTo  closest_to,
OutputIterator  result,
CentroidEqual  c_equal = CentroidEqual{},
Visitor  visitor = Visitor{} 
)
Parameters
points
centers
centroidfunctor return centroid of set of samples
closest_to
resultpairs of point and id of cluster (number from 0,1,2 ...,k-1)
c_equal
visitor
Template Parameters
Points
Centers
Centroid
ClosestTo
OutputIterator
CentroidEqual
Visitor

Definition at line 105 of file k_means_clustering_engine.hpp.

template<typename Objects , typename OutputIterator , typename ObjectSizeFunctor , typename ObjectValueFunctor = utils::return_one_functor>
auto paal::knapsack_0_1 ( Objects &&  objects,
detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects >  capacity,
OutputIterator  out,
ObjectSizeFunctor  size,
ObjectValueFunctor  value = ObjectValueFunctor{} 
)

Solution to Knapsack 0/1 problem.

Template Parameters
Objects
OutputIterator
ObjectSizeFunctor
ObjectValueFunctor
Parameters
oBegingiven objects
oEnd
outthe result is returned using output iterator
sizefunctor that for given object returns its size
valuefunctor that for given object returns its value

Definition at line 268 of file knapsack_0_1.hpp.

template<typename Objects , typename ObjectSizeFunctor , typename ObjectValueFunctor = utils::return_one_functor>
auto paal::knapsack_0_1_no_output ( Objects &&  objects,
detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects >  capacity,
ObjectSizeFunctor  size,
ObjectValueFunctor  value = ObjectValueFunctor{} 
)

Solution to Knapsack 0/1 problem, without retrieving the objects in the solution.

Template Parameters
Objects
OutputIterator
ObjectSizeFunctor
ObjectValueFunctor
Parameters
oBegingiven objects
oEnd
sizefunctor that for given object returns its size
valuefunctor that for given object returns its value

Definition at line 295 of file knapsack_0_1.hpp.

template<typename OutputIterator , typename Objects , typename ObjectSizeFunctor , typename ObjectValueFunctor , typename std::enable_if< !detail::is_range_const< Objects >::value >::type * = nullptr>
detail::knapsack_base<Objects, ObjectSizeFunctor, ObjectValueFunctor>::return_type paal::knapsack_0_1_two_app ( Objects &&  objects,
typename detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects >  capacity,
OutputIterator  out,
ObjectValueFunctor  value,
ObjectSizeFunctor  size 
)

detail

this version of algorithm might permute, the input range

Definition at line 83 of file knapsack_0_1_two_app.hpp.

template<typename Objects , typename OutputIterator , typename ObjectSizeFunctor , typename ObjectValueFunctor = utils::return_one_functor>
detail::knapsack_base<Objects, ObjectSizeFunctor, ObjectValueFunctor>::return_type paal::knapsack_unbounded ( Objects &&  objects,
detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects >  capacity,
OutputIterator  out,
ObjectSizeFunctor  size,
ObjectValueFunctor  value = ObjectValueFunctor() 
)

Solution to the knapsack problem.

Template Parameters
Objects
OutputIterator
ObjectSizeFunctor
ObjectValueFunctor
Parameters
oBegingiven objects
oEnd
outthe result is returned using output iterator
sizefunctor that for given object returns its size
valuefunctor that for given object returns its value

Definition at line 171 of file knapsack_unbounded.hpp.

template<typename OutputIterator , typename Objects , typename ObjectSizeFunctor , typename ObjectValueFunctor , typename std::enable_if<!detail::is_range_const< Objects >::value >::type * = nullptr>
detail::knapsack_base<Objects, ObjectSizeFunctor, ObjectValueFunctor>::return_type paal::knapsack_unbounded_two_app ( Objects &&  objects,
typename detail::FunctorOnRangePValue< ObjectSizeFunctor, Objects >  capacity,
OutputIterator  out,
ObjectValueFunctor  value,
ObjectSizeFunctor  size 
)

detail

this version of algorithm might permute, the input range

Definition at line 71 of file knapsack_unbounded_two_app.hpp.

template<typename Letter >
void paal::lcp ( std::vector< int > const &  suffix_array,
std::vector< int > const &  rank,
std::vector< int > &  lcp,
std::vector< Letter > const &  sumWords 
)

fill array lcp lcp[0] is undefined and lcp[i] stores the largest common prefix of the lexicographically i-1'th smallest suffix and its predecessor in the suffix array

Template Parameters
Letter
Parameters
suffix_array
rank
lcpplace for Lcp
sumWords

Definition at line 37 of file lcp.hpp.

template<typename FloatType = double, typename Probs , typename TestResults >
FloatType paal::likelihood ( Probs &&  probs,
TestResults &&  test_results 
)
Template Parameters
FloatType
Probs
TestResults
Parameters
probs
test_results

Definition at line 82 of file performance_measures.hpp.

template<typename FloatType >
FloatType paal::likelihood_from_log_loss ( FloatType  log_loss)
Template Parameters
FloatType
Parameters
log_loss
Returns

Definition at line 66 of file performance_measures.hpp.

template<typename FloatType = double, typename Probs , typename TestResults >
FloatType paal::log_loss ( Probs &&  probs,
TestResults &&  test_results 
)
Template Parameters
FloatType
Probs
TestResults
Parameters
probs
test_results

Definition at line 41 of file performance_measures.hpp.

template<typename Value , typename Size >
density<Value, Size> paal::make_density ( Value  value,
Size  size 
)

make for density

Template Parameters
Value
Size
Parameters
value
size
Returns

Definition at line 63 of file knapsack_utils.hpp.

template<typename Graph , typename EdgeWeightMap , typename VertexIndexMap , typename Rand = std::default_random_engine>
distance_oracle_thorup2kminus1approximation<Graph, VertexIndexMap, EdgeWeightMap, Rand> paal::make_distance_oracle_thorup2kminus1approximation ( const Graph &  g,
const int  k,
VertexIndexMap  index,
EdgeWeightMap  edge_weight,
Rand &&  random_engine = Rand(5426u) 
)
Template Parameters
Graph
EdgeWeightMap
VertexIndexMap
Rand
Parameters
g- given graph
k- approximation parameter
index- graph index map
edge_weight- graph edge weight map
random_engine- random engine
Returns
2k-1 approximate distance oracle

Definition at line 484 of file thorup_2kminus1.hpp.

template<typename Graph , typename P = char, typename T = boost::detail::unused_tag_type, typename R = boost::no_property, typename Rand = std::default_random_engine>
auto paal::make_distance_oracle_thorup2kminus1approximation ( const Graph &  g,
const int  k,
const boost::bgl_named_params< P, T, R > &  params = boost::no_named_parameters(),
Rand &&  random_engine = Rand(5426u) 
) -> distance_oracle_thorup2kminus1approximation<Graph, decltype(choose_const_pmap(get_param(params, boost::vertex_index), g, boost::vertex_index)), decltype(choose_const_pmap(get_param(params, boost::edge_weight), g, boost::edge_weight)), Rand>
Template Parameters
Graph
P
T
R
Rand
Parameters
g- given graph
k- approximation parameter
params- named parameters
random_engine- random engine
Returns
2k-1 approximate distance oracle

Definition at line 518 of file thorup_2kminus1.hpp.

template<unsigned int TerminalsLimit = 32, typename Metric , typename Terminals , typename NonTerminals >
dreyfus_wagner<Metric, Terminals, NonTerminals, TerminalsLimit> paal::make_dreyfus_wagner ( const Metric &  metric,
const Terminals &  terminals,
const NonTerminals &  non_terminals 
)

Creates a dreyfus_wagner object.

Template Parameters
TerminalsLimit
Metric
Terminals
NonTerminals

Definition at line 309 of file dreyfus_wagner.hpp.

template<typename FunctionGenerator >
auto paal::make_hash_function_tuple_generator ( FunctionGenerator &&  function_generator,
unsigned  hash_functions_per_point 
)
Template Parameters
FunctionGenerator
Parameters
function_generatorfunctor generating hash functions
hash_functions_per_pointnumber of hash functions in single tuple
Returns

Definition at line 156 of file lsh_nearest_neighbors_regression.hpp.

template<class Comparator >
less_pointees_t<Comparator> paal::make_less_pointees_t ( Comparator  compare)

make function for less_pointees_t

Template Parameters
Comparator
Parameters
compare
Returns

Definition at line 48 of file less_pointees.hpp.

template<typename TrainingPoints , typename TrainingResults , typename LshFunctionGenerator >
auto paal::make_lsh_nearest_neighbors_regression ( TrainingPoints &&  training_points,
TrainingResults &&  training_results,
unsigned  passes,
LshFunctionGenerator &&  lsh_function_generator,
unsigned  threads_count = std::thread::hardware_concurrency() 
)

this is the most general version of the make_lsh_nearest_neighbors_regression, It takes any hash function generator.

Template Parameters
TrainingPoints
TrainingResults
LshFunctionGenerator
Parameters
training_points
training_results
passesnumber of used LSH functions
lsh_function_generatorfunctor generating proper LSH functions
threads_count
Returns
lsh_nearest_neighbors_regression model

Definition at line 359 of file lsh_nearest_neighbors_regression.hpp.

template<typename TrainingPoints , typename TrainingResults , typename FunctionGenerator >
auto paal::make_lsh_nearest_neighbors_regression_tuple_hash ( TrainingPoints &&  training_points,
TrainingResults &&  training_results,
unsigned  passes,
FunctionGenerator &&  function_generator,
unsigned  hash_functions_per_point,
unsigned  threads_count = std::thread::hardware_concurrency() 
)

This is the special version of make_lsh_nearest_neighbors_regression. This version assumes that hash function is concatenation (tuple) of several hash functions. In this function user provide Function generator for the inner functions only.

Template Parameters
TrainingPoints
TrainingResults
FunctionGenerator
Parameters
training_points
training_results
passes
function_generator
hash_functions_per_point
threads_count
Returns

Definition at line 399 of file lsh_nearest_neighbors_regression.hpp.

template<typename Stream >
pretty_stream<Stream> paal::make_pretty_stream ( Stream &  s,
double  epsilon = 1e-9 
)

make for pretty_stream

Template Parameters
Stream
Parameters
s
epsilon
Returns

Definition at line 134 of file pretty_stream.hpp.

template<typename FloatType = double, typename Probs , typename TestResults >
FloatType paal::mean_absolute_error ( Probs &&  probs,
TestResults &&  test_results 
)
Template Parameters
FloatType
Probs
TestResults
Parameters
probs
test_results

Definition at line 99 of file performance_measures.hpp.

template<typename Rand = std::default_random_engine, typename Distribution = std::uniform_real_distribution<double>, typename LP = lp::glp, typename Graph , typename OutputIterator , typename P , typename T , typename R >
auto paal::multiway_cut ( const Graph &  g,
OutputIterator  out,
const boost::bgl_named_params< P, T, R > &  params,
Rand &&  random_engine = std::default_random_engine(5426u) 
) -> typename boost::property_traits<puretype( boost::choose_const_pmap(get_param(params, boost::edge_weight), g, boost::edge_weight))>::value_type

detail

this is solve multiway_cut problem and return cut_cost example:

#include <boost/graph/adjacency_list.hpp>
int main() {
// sample data
std::vector<std::pair<int,int>> edges_p{{0,3},{1,3},
{0,4},{2,4},
{1,5},{2,5},
{3,6},{4,6},
{3,7},{5,7},
{4,8},{5,8},
{6,7},{6,8},{7,8}
};
const int vertices_num = 9;
std::vector<int> cost_edges{100,100,100,100,100,100,10,10,10,10,10,10,1,1,1};
std::vector<int> terminals = { 0, 1, 2 };
boost::adjacency_list<
boost::vecS, boost::vecS, boost::undirectedS,
boost::property<boost::vertex_index_t, int,
boost::property<boost::vertex_color_t, int>>,
boost::property<boost::edge_weight_t, int>
> graph(edges_p.begin(), edges_p.end(), cost_edges.begin(), vertices_num);
for (std::size_t i = 1; i <= terminals.size(); ++i) {
put(boost::vertex_color, graph, terminals[i - 1], i);
}
//solve
std::vector<std::pair<int,int>> vertices_parts;
auto cost_cut = paal::multiway_cut(graph, back_inserter(vertices_parts));
//print result
std::cout << "cost cut: " << cost_cut << std::endl;
std::cout << "vertices (part)" << std::endl;
for(auto i: vertices_parts) {
std::cout << " " << i.first << " ( " << i.second << " )" << std::endl;
}
paal::lp::glp::free_env();
}
Parameters
Graphgraph
OutputIteratorresult pairs of vertex descriptor and number form (1,2, ... ,k) id of part
random_engine
params
Template Parameters
Graph
OutputIterator
Randrandom engine
Distributionused to chose random radius
LP
P
T
R

Definition at line 254 of file multiway_cut.hpp.

template<typename Rand = std::default_random_engine, typename Distribution = std::uniform_real_distribution<double>, typename LP = lp::glp, typename Graph , class OutputIterator >
auto paal::multiway_cut ( const Graph &  graph,
OutputIterator  result,
Rand  random_engine = std::default_random_engine(5426u) 
) -> detail::CostType<Graph>

this is solve multiway_cut problem and return cut_cost example:

#include <boost/graph/adjacency_list.hpp>
int main() {
// sample data
std::vector<std::pair<int,int>> edges_p{{0,3},{1,3},
{0,4},{2,4},
{1,5},{2,5},
{3,6},{4,6},
{3,7},{5,7},
{4,8},{5,8},
{6,7},{6,8},{7,8}
};
const int vertices_num = 9;
std::vector<int> cost_edges{100,100,100,100,100,100,10,10,10,10,10,10,1,1,1};
std::vector<int> terminals = { 0, 1, 2 };
boost::adjacency_list<
boost::vecS, boost::vecS, boost::undirectedS,
boost::property<boost::vertex_index_t, int,
boost::property<boost::vertex_color_t, int>>,
boost::property<boost::edge_weight_t, int>
> graph(edges_p.begin(), edges_p.end(), cost_edges.begin(), vertices_num);
for (std::size_t i = 1; i <= terminals.size(); ++i) {
put(boost::vertex_color, graph, terminals[i - 1], i);
}
//solve
std::vector<std::pair<int,int>> vertices_parts;
auto cost_cut = paal::multiway_cut(graph, back_inserter(vertices_parts));
//print result
std::cout << "cost cut: " << cost_cut << std::endl;
std::cout << "vertices (part)" << std::endl;
for(auto i: vertices_parts) {
std::cout << " " << i.first << " ( " << i.second << " )" << std::endl;
}
paal::lp::glp::free_env();
}

example file is multiway_cut_example.cpp

Parameters
Graphgraph
intrepeats number of sets of radius
OutputIteratorresult pairs of vertex descriptor and number form (1,2, ... ,k) id of part
Template Parameters
Randrandom engine
Distributionused to chose random radius
LP
Graph
OutputIterator

Definition at line 290 of file multiway_cut.hpp.

template<typename Functor >
void paal::parse ( std::istream &  input_stream,
Functor  f 
)

parses stream ignoring empty lines or beginning with '#'

Template Parameters
Functor
Parameters
input_stream
ffunctor called on each line with params: first token of line and stream after reading that token

Definition at line 33 of file parse_file.hpp.

template<typename Functor >
void paal::parse ( const std::string &  filename,
Functor  f 
)

additional version of parse function

Template Parameters
Functor
Parameters
filename
f

Definition at line 56 of file parse_file.hpp.

std::string paal::pretty_to_string ( double  x,
double  epsilon = 1e-9 
)
inline

pretty_to_string prints double which is close to int as int

Parameters
x
epsilon
Returns

Definition at line 32 of file pretty_stream.hpp.

template<typename T >
std::string paal::pretty_to_string ( T &&  t)

generic version of pretty_to_string

Template Parameters
T
Parameters
t
Returns

Definition at line 51 of file pretty_stream.hpp.

template<typename Range , typename Stream >
void paal::print_collection ( Stream &  o,
Range &&  r,
const std::string &  del 
)

prints collection with delimiters without trailing delimiter

Template Parameters
Range
Stream
Parameters
o
r
del

Definition at line 34 of file print_collection.hpp.

template<typename Matrix , typename Stream >
void paal::print_matrix ( Stream &  o,
Matrix &&  m,
const std::string &  del 
)

prints matrix with delimiters

Template Parameters
Matrix
Stream
Parameters
o
m
del

Definition at line 56 of file print_collection.hpp.

template<typename Restrictions >
RestrictionsVector paal::prune_restrictions_to_tree ( Restrictions  res,
int  N 
)

Returns a list of restrictions, made of the edges of a maximum spanning tree in a clique with edge weights equal to restriction values between the edges.

Template Parameters
Restrictions
Parameters
resrestrictions
Nnumber of vertices
Returns
A minimum set of restrictions needed to be checked by the oracle.

Definition at line 41 of file prune_restrictions_to_tree.hpp.

template<typename CoordinateType , typename RowType = std::vector<CoordinateType>, typename ShouldIgnoreBadRow = utils::always_true>
void paal::read_rows ( std::istream &  input_stream,
std::vector< RowType > &  rows,
std::size_t  row_size,
std::size_t  max_rows_to_read,
ShouldIgnoreBadRow &&  should_ignore_bad_row = ShouldIgnoreBadRow{} 
)

reads up to max_rows_to_read rows of size row_size

Template Parameters
RowType
ShouldIgnoreBadRow
Parameters
input_stream
rows
row_size
max_rows_to_read
should_ignore_bad_row

Definition at line 48 of file read_rows.hpp.

template<typename CoordinateType , typename RowType = std::vector<CoordinateType>, typename ShouldIgnoreBadRow = utils::always_true, typename FailureMessage = utils::failure_message>
void paal::read_rows_first_row_size ( std::istream &  input_stream,
std::vector< RowType > &  rows,
std::size_t  max_rows_to_read,
ShouldIgnoreBadRow &&  should_ignore_bad_row = ShouldIgnoreBadRow{},
FailureMessage &&  failure_message = FailureMessage{} 
)

reads up to max_rows_to_read rows, size is determine by first row

Template Parameters
CoordinateType
RowType
ShouldIgnoreBadRow
FailureMessage
Parameters
input_stream
rows
max_rows_to_read
should_ignore_bad_row
failure_message

Definition at line 87 of file read_rows.hpp.

template<typename RowType , typename ResultType = int, typename ShouldIgnoreBadRow = utils::always_false>
void paal::read_svm ( std::istream &  input_stream,
std::size_t &  max_dimensions,
std::vector< std::tuple< RowType, ResultType >> &  points,
std::size_t  max_points_to_read,
ShouldIgnoreBadRow &&  should_ignore_bad_row = ShouldIgnoreBadRow{} 
)

detail

reads up to max_points_to_read svm rows, updating max_dimensions on each row

Template Parameters
RowType
ResultType
ShouldIgnoreBadRow
Parameters
input_stream
max_dimensions
points
max_points_to_read
should_ignore_bad_row

Definition at line 206 of file read_svm.hpp.

template<typename RowType , typename ResultType = int>
auto paal::read_svm ( std::istream &  input_stream)

Function parses svm stream of format:

Template Parameters
RowType
ResultType
Parameters
input_stream
Returns
vector of tuples (point, max_dimensions), where each point is tuple (RowType, result)

Definition at line 238 of file read_svm.hpp.

template<typename Graph , typename OutputIterator , typename EdgeWeightMap , typename ColorMap >
auto paal::steiner_tree_greedy ( const Graph &  g,
OutputIterator  out,
EdgeWeightMap  edge_weight,
ColorMap  color_map 
) -> typename std::pair< typename boost::property_traits<EdgeWeightMap>::value_type, typename boost::property_traits<EdgeWeightMap>::value_type>

non-named version of steiner_tree_greedy

Template Parameters
Graph
OutputIterator
EdgeWeightMap
ColorMap
Parameters
g- given graph
out- edge output iterator
edge_weight
color_map

Definition at line 97 of file steiner_tree_greedy.hpp.

template<typename Graph , typename OutputIterator , typename P , typename T , typename R >
auto paal::steiner_tree_greedy ( const Graph &  g,
OutputIterator  out,
const boost::bgl_named_params< P, T, R > &  params 
)

named version of steiner_tree_greedy

Template Parameters
Graph
OutputIterator
P
T
R
Parameters
g- given graph
out- edge output iterator
params

Definition at line 213 of file steiner_tree_greedy.hpp.

template<typename Graph , typename OutputIterator >
auto paal::steiner_tree_greedy ( const Graph &  g,
OutputIterator  out 
)

version of steiner_tree_greedy with all default parameters

Template Parameters
Graph
OutputIterator
Parameters
g- given graph
out- edge output iterator

Definition at line 231 of file steiner_tree_greedy.hpp.

template<typename Metric , typename Voronoi , typename OutputIterator >
void paal::steiner_tree_zelikovsky11per6approximation ( const Metric &  m,
const Voronoi &  v,
OutputIterator  out 
)

11/6 approximation for steiner_tree problem

Template Parameters
Metric
Voronoi
OutputIterator
Parameters
m
v
out

Definition at line 360 of file zelikovsky_11_per_6.hpp.

template<typename Letter >
void paal::suffix_array ( std::vector< Letter > &  text,
std::vector< int > &  SA,
Letter  max_letter = 0 
)

detail

require text.size()>=2 fill suffix_array suffix_array[i] contains the starting position of the i-1'th smallest suffix in Word

Template Parameters
Letter
Parameters
text- text
SAplace for suffix_array
max_letteroptional parameter max_letter in alphabet

Definition at line 227 of file suffix_array.hpp.