Representation of a labeling problem.
More...
#include <problem.h>
Representation of a labeling problem.
- Note
- not available in Python bindings
Definition at line 70 of file problem.h.
◆ Problem() [1/2]
Constructor for Problem.
The extent argument specifies the bounds of the incoming coordinates.
Definition at line 57 of file problem.cpp.
◆ ~Problem()
◆ Problem() [2/2]
pal::Problem::Problem |
( |
const Problem & |
other | ) |
|
|
delete |
◆ addCandidatePosition()
void pal::Problem::addCandidatePosition |
( |
std::unique_ptr< LabelPosition > |
position | ) |
|
|
inline |
Adds a candidate label position to the problem.
- Parameters
-
position | label candidate position. Ownership is transferred to Problem. |
- Since
- QGIS 2.12
Definition at line 97 of file problem.h.
◆ allCandidatesIndex()
Returns the index containing all label candidates.
Definition at line 154 of file problem.h.
◆ chain_search()
void Problem::chain_search |
( |
| ) |
|
Test with very-large scale neighborhood.
Definition at line 562 of file problem.cpp.
◆ featureCandidate()
LabelPosition* pal::Problem::featureCandidate |
( |
int |
feature, |
|
|
int |
candidate |
|
) |
| const |
|
inline |
Returns the candidate corresponding to the specified feature and candidate index.
Definition at line 112 of file problem.h.
◆ featureCandidateCount()
int pal::Problem::featureCandidateCount |
( |
int |
feature | ) |
const |
|
inline |
Returns the number of candidates generated for the feature at the specified index.
Definition at line 107 of file problem.h.
◆ featureCount()
std::size_t pal::Problem::featureCount |
( |
| ) |
const |
|
inline |
Returns the total number of features considered during the labeling problem.
Definition at line 102 of file problem.h.
◆ getSolution()
Solves the labeling problem, selecting the best candidate locations for all labels and returns a list of these calculated label positions.
If returnInactive is true
, then the best positions for ALL labels will be returned, regardless of whether these labels overlap other labels.
If the optional unlabeled list is specified, it will be filled with a list of all feature labels which could not be placed in the returned solution (e.g. due to overlaps or other constraints).
Ownership of the returned labels is not transferred - it resides with the pal object.
Definition at line 657 of file problem.cpp.
◆ init_sol_falp()
void Problem::init_sol_falp |
( |
| ) |
|
◆ operator=()
◆ positionsWithNoCandidates()
std::vector< std::unique_ptr< LabelPosition > >* pal::Problem::positionsWithNoCandidates |
( |
| ) |
|
|
inline |
Returns a reference to the list of label positions which correspond to features with no candidates.
Ownership of positions added to this list is transferred to the problem.
Definition at line 146 of file problem.h.
◆ reduce()
◆ Pal
The documentation for this class was generated from the following files:
- /build/qgis-3.18.1+99unstable/src/core/pal/problem.h
- /build/qgis-3.18.1+99unstable/src/core/pal/problem.cpp