Skip to content

Commit 623fd6f

Browse files
committedJan 18, 2018
Drop an unused messy pal function
1 parent d8402ac commit 623fd6f

File tree

2 files changed

+0
-67
lines changed

2 files changed

+0
-67
lines changed
 

‎src/core/pal/pal.cpp

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -448,61 +448,6 @@ Problem *Pal::extract( double lambda_min, double phi_min, double lambda_max, dou
448448
return prob;
449449
}
450450

451-
/*
452-
* BIG MACHINE
453-
*/
454-
QList<LabelPosition *> *Pal::labeller( double bbox[4], PalStat **stats, bool displayAll )
455-
{
456-
Problem *prob = nullptr;
457-
458-
SearchMethod old_searchMethod = searchMethod;
459-
460-
if ( displayAll )
461-
{
462-
setSearch( POPMUSIC_TABU );
463-
}
464-
465-
// First, extract the problem
466-
if ( !( prob = extract( bbox[0], bbox[1], bbox[2], bbox[3] ) ) )
467-
{
468-
// nothing to be done => return an empty result set
469-
if ( stats )
470-
( *stats ) = new PalStat();
471-
return new QList<LabelPosition *>();
472-
}
473-
474-
// reduce number of candidates
475-
// (remove candidates which surely won't be used)
476-
prob->reduce();
477-
prob->displayAll = displayAll;
478-
479-
// search a solution
480-
if ( searchMethod == FALP )
481-
prob->init_sol_falp();
482-
else if ( searchMethod == CHAIN )
483-
prob->chain_search();
484-
else
485-
prob->popmusic();
486-
487-
// Post-Optimization
488-
//prob->post_optimization();
489-
490-
491-
QList<LabelPosition *> *solution = prob->getSolution( displayAll );
492-
493-
if ( stats )
494-
*stats = prob->getStats();
495-
496-
delete prob;
497-
498-
if ( displayAll )
499-
{
500-
setSearch( old_searchMethod );
501-
}
502-
503-
return solution;
504-
}
505-
506451
void Pal::registerCancelationCallback( Pal::FnIsCanceled fnCanceled, void *context )
507452
{
508453
fnIsCanceled = fnCanceled;

‎src/core/pal/pal.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -130,18 +130,6 @@ namespace pal
130130
*/
131131
void removeLayer( Layer *layer );
132132

133-
/**
134-
* \brief the labeling machine
135-
* Will extract all active layers
136-
*
137-
* \param bbox map extent
138-
* \param stats A PalStat object (can be NULL)
139-
* \param displayAll if true, all feature will be labelled even though overlaps occur
140-
*
141-
* \returns A list of label to display on map
142-
*/
143-
QList<LabelPosition *> *labeller( double bbox[4], PalStat **stats, bool displayAll );
144-
145133
typedef bool ( *FnIsCanceled )( void *ctx );
146134

147135
//! Register a function that returns whether this job has been canceled - PAL calls it during the computation

0 commit comments

Comments
 (0)
Please sign in to comment.