Module algorithms

Module algorithms 

Source
Expand description

Algorithms for solving optimization problems.

The algorithms in this module are useful for preprocessing and relaxation.

Structs§

UnionFindTree
Union find tree data structure.

Functions§

compute_bin_packing_lb2
Computes the number of bins to pack items, whose weights are at least half of the capacity.
compute_bin_packing_lb3
Computes the number of bins to pack items, whose weights are at least one third of the capacity.
compute_fractional_knapsack_profit
Computes the profit of the knapsack problem, allowing fractions of items to be taken.
compute_minimum_spanning_tree_weight
Computes the weight of the minimum spanning tree of a graph.
compute_pairwise_euclidean_distances
Computes the Euclidean distances between all pairs of points.
compute_pairwise_shortest_path_costs
Computes the shortest path cost between all pairs of nodes in a graph.
compute_pairwise_shortest_path_costs_with_option
Computes the shortest path cost between all pairs of nodes in a graph.
sort_knapsack_items_by_efficiency
Sort the items of the knapsack problem by their efficiency in a descending order.
sort_weight_matrix
Sorts an weight matrix in a ascending order.
sort_weight_matrix_with_option
Sorts an weight matrix in a ascending order.
sort_weight_matrix_without_diagonal
Sorts an weight matrix in a ascending order.
take_column_wise_max
Returns an iterator taking the maximum of each column in a matrix.
take_column_wise_max_with_option
Returns an iterator taking the maximum of each column in a matrix.
take_column_wise_max_without_diagonal
Returns an iterator taking the maximum of each column in a matrix, ignoring the diagonal.
take_column_wise_min
Returns an iterator taking the minimum of each column in a matrix.
take_column_wise_min_with_option
Returns an iterator taking the minimum of each column in a matrix.
take_column_wise_min_without_diagonal
Returns an iterator taking the minimum of each column in a matrix, ignoring the diagonal.
take_row_wise_max
Returns an iterator taking the maximum of each row in a matrix.
take_row_wise_max_with_option
Returns an iterator taking the maximum of each row in a matrix.
take_row_wise_max_without_diagonal
Returns an iterator taking the maximum of each row in a matrix, ignoring the diagonal.
take_row_wise_min
Returns an iterator taking the minimum of each row in a matrix.
take_row_wise_min_with_option
Returns an iterator taking the minimum of each row in a matrix.
take_row_wise_min_without_diagonal
Returns an iterator taking the minimum of each row in a matrix, ignoring the diagonal.
transpose
Transpose an m x n matrix.