PWatchlistOptions Class Reference

Detailed Description

The PWatchlistOptions class is used for holding common watchlist options and determine how a specific PWatchlist is run.

Definition at line 28 of file PWatchlistOptions.h.

#include <PWatchlistOptions.h>

Constructor & Destructor Documentation

◆ PWatchlistOptions() [1/3]

PWatchlistOptions::PWatchlistOptions ( )

Constructs a default set of options:

  • threshold set to -infinity
  • topN set to 0 (which means "returns all subjects")
  • normalisation set to false

Warning: when using PWatchlistOptions in PWatchlist::Search() algorithm, 'threshold' parameter has higher priority than 'topN' parameter, so the algorithm will first filter by threshold and then return the topN of what is left.

◆ PWatchlistOptions() [2/3]

PWatchlistOptions::PWatchlistOptions ( float  threshold,
papillon::int32  topN,
bool  normalisation,
const PProperties additionalParameters 
)

Constructs a set of options from the specified parameters.

◆ PWatchlistOptions() [3/3]

PWatchlistOptions::PWatchlistOptions ( const PWatchlistOptions other)

Constructs a shared copy of other.

◆ ~PWatchlistOptions()

virtual PWatchlistOptions::~PWatchlistOptions ( )
virtual

Destroys this object.

Member Function Documentation

◆ GetNormalise()

bool PWatchlistOptions::GetNormalise ( ) const

Gets the normalise status.

◆ GetParameter()

PResult PWatchlistOptions::GetParameter ( const PString parameterName,
PObject value 
) const

Gets the value of the specified additional parameter.

Returns PResult::C_OK if success, another result otherwise (parameter not found or wrong class).

◆ GetThreshold()

float PWatchlistOptions::GetThreshold ( ) const

Gets the threshold used for the watchlist.

◆ GetTopN()

papillon::int32 PWatchlistOptions::GetTopN ( ) const

Gets the maximum number of results to return from a watchlist search (the topN best matches)

◆ operator=()

PWatchlistOptions& PWatchlistOptions::operator= ( const PWatchlistOptions other)

Performs a shared copy of other to this object.

◆ Reset()

void PWatchlistOptions::Reset ( )

Resets these options to default values.

◆ SetNormalise()

void PWatchlistOptions::SetNormalise ( bool  normalise)

Sets whether scores should be normalized before applying threshold when doing watchlist searches.

◆ SetParameter()

PResult PWatchlistOptions::SetParameter ( const PString parameterName,
const PObject value 
)

Sets an additional parameter; can be any PObject (for example, use PInt32 for an int32, see PBoxing).

Returns PResult::C_OK if success, another result otherwise.

◆ SetThreshold()

PResult PWatchlistOptions::SetThreshold ( float  threshold)

Sets the threshold for watchlist searches (can be a negative number).

Search results (comparer scores) below this threshold will not be returned, scores equal or above will be kept.

◆ SetTopN()

PResult PWatchlistOptions::SetTopN ( const papillon::int32  topN)

Sets the maximum number of results to return from a watchlist search (the topN best matches) Returns PResult::C_OK if success, another result otherwise.

Friends And Related Function Documentation

◆ PWatchlistOptionsImpl

friend class PWatchlistOptionsImpl
friend

Definition at line 111 of file PWatchlistOptions.h.