36 #include "qgis_core.h" 96 void addCandidatePosition( std::unique_ptr< LabelPosition > position ) { mLabelPositions.emplace_back( std::move( position ) ); }
132 QList<LabelPosition *> getSolution(
bool returnInactive, QList<LabelPosition *> *unlabeled =
nullptr );
137 void init_sol_falp();
147 return &mPositionsWithNoCandidates;
165 QStringList labelledLayersName;
170 int mTotalCandidates = 0;
180 std::size_t mFeatureCount = 0;
185 bool mDisplayAll =
false;
190 double mMapExtentBounds[4] = {0, 0, 0, 0};
192 std::vector< std::unique_ptr< LabelPosition > > mLabelPositions;
197 std::vector< std::unique_ptr< LabelPosition > > mPositionsWithNoCandidates;
199 std::vector< int > mFeatStartId;
200 std::vector< int > mFeatNbLp;
201 std::vector< double > mInactiveCost;
208 std::vector< int > activeLabelIds;
210 double totalCost = 0;
212 void init( std::size_t featureCount )
214 activeLabelIds.resize( featureCount, -1 );
220 double mNbOverlap = 0.0;
222 Chain *chain(
int seed );
226 void solution_cost();
A rectangle specified with double values.
LabelPosition * featureCandidate(int feature, int candidate) const
Returns the candidate corresponding to the specified feature and candidate index. ...
std::vector< std::unique_ptr< LabelPosition > > * positionsWithNoCandidates()
Returns a reference to the list of label positions which correspond to features with no candidates...
A rtree spatial index for use in the pal labeling engine.
void addCandidatePosition(std::unique_ptr< LabelPosition > position)
Adds a candidate label position to the problem.
PalRtree< LabelPosition > & allCandidatesIndex()
Returns the index containing all label candidates.
int featureCandidateCount(int feature) const
Returns the number of candidates generated for the feature at the specified index.
std::size_t featureCount() const
Returns the total number of features considered during the labeling problem.
LabelPosition is a candidate feature label position.
Representation of a labeling problem.