Expand description
Algorithms for solving optimization problems.
The algorithms in this module are useful for preprocessing and relaxation.
Structs§
- Union
Find Tree - 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.