|
ADS
Algorithms and Data Structures
|
Two problems of dynamic programming on a matrix of \( m \) rows and \( n \) columns, each cell solved from its neighbors above and to the left: More...
#include "ADS/Contract.h"#include <algorithm>#include <cstddef>#include <cstdint>#include <vector>#include "ADS/optimization/impl/GridPaths.tpp"Go to the source code of this file.
Classes | |
| struct | ADS::GridSquare |
| a square of a matrix: its side and its upper left cell More... | |
Namespaces | |
| namespace | ADS |
Functions | |
| template<class T> | |
| GridSquare | ADS::largestSquare (const std::vector< std::vector< T > > &A) |
| the largest square of nonzero cells of \( A \), the first in the order of the rows of its lower right cell | |
| template<class C = std::uint64_t, class T> | |
| C | ADS::countLatticePaths (const std::vector< std::vector< T > > &B) |
| the number of the paths from the upper left to the lower right cell of \( B \), each step right or down, through nonzero cells only; 0 for \( B \) empty | |
Two problems of dynamic programming on a matrix of \( m \) rows and \( n \) columns, each cell solved from its neighbors above and to the left:
The contracts [see Contract.h]: the matrix is a rectangle; the square found is inside the matrix and all nonzero (checked at level 3). The functions are defined in GridPaths.tpp.