#include <PairMatchSet.h>
Classes | |
class | iterator |
Public Types | |
enum | { use_existing = true } |
enum | { NoMatch = -1 } |
Public Member Functions | |
PairMatchSet (unsigned size=0) | |
Construct a PairMatchSet for values of $i_1$ between 0 and size. | |
PairMatchSet (const PairMatchSet &that) | |
PairMatchSet & | operator= (const PairMatchSet &that) |
virtual | ~PairMatchSet () |
Destructor. | |
void | set_size (unsigned size) |
Set the maximum allowed value of i1 to size. | |
bool | add_match (int i1, int i2) |
Add the pair (i1, i2) to the match set. | |
int | get_match_12 (int i1) const |
Return any match for i1. | |
int | get_match_21 (int i2) const |
Return any match for i2. | |
void | clear_match_1 (int i1) |
Remove any match for i1. | |
void | set_identity () |
Set this match set to contain matches (i,i) for i=0..size. | |
unsigned int | count () const |
void | update_feature_match_data () |
void | clear () |
Empty this match set. | |
void | update (const vcl_vector< bool > &inliers) |
int | size () const |
Return the maximum allowed value of i1. | |
int | compute_match_count () |
Count the number of matches in this set. | |
void | print_brief (vcl_ostream &s) const |
Summarize matches on stream. | |
void | print_brief () const |
Summarize matches on cout. | |
void | write_ascii (vcl_ostream &s) const |
Write matches in ASCII to stream. | |
bool | read_ascii (vcl_istream &s) |
bool | get_match (int at, int *i1, int *i2) const |
Static Public Member Functions | |
static bool | matchp (int i) |
Return true if i is not the "NoMatch" value. | |
Private Attributes | |
vcl_vector< int > | matches_ |
unsigned int | match_count_ |
Friends | |
vcl_ostream & | operator<< (vcl_ostream &s, const PairMatchSet &cc) |
vcl_istream & | operator>> (vcl_istream &s, PairMatchSet &cc) |
Definition at line 34 of file PairMatchSet.h.
anonymous enum [inherited] |
Definition at line 29 of file MatchSet.h.
anonymous enum |
Definition at line 41 of file PairMatchSet.h.
PairMatchSet::PairMatchSet | ( | unsigned | size = 0 | ) |
Construct a PairMatchSet for values of $i_1$ between 0 and size.
Definition at line 24 of file PairMatchSet.cxx.
PairMatchSet::PairMatchSet | ( | const PairMatchSet & | that | ) |
Definition at line 37 of file PairMatchSet.cxx.
PairMatchSet::~PairMatchSet | ( | ) | [virtual] |
Destructor.
Definition at line 31 of file PairMatchSet.cxx.
bool PairMatchSet::add_match | ( | int | i1, |
int | i2 | ||
) |
Add the pair (i1, i2) to the match set.
If i1 had an existing match it is overwritten.
Definition at line 58 of file PairMatchSet.cxx.
void PairMatchSet::clear | ( | ) |
Empty this match set.
Definition at line 131 of file PairMatchSet.cxx.
void PairMatchSet::clear_match_1 | ( | int | i1 | ) |
Remove any match for i1.
Specifically, remove tuples whose first element is i1.
Definition at line 75 of file PairMatchSet.cxx.
int PairMatchSet::compute_match_count | ( | ) |
Count the number of matches in this set.
Definition at line 147 of file PairMatchSet.cxx.
unsigned int PairMatchSet::count | ( | ) | const [inline] |
Definition at line 60 of file PairMatchSet.h.
bool PairMatchSet::get_match | ( | int | at, |
int * | i1, | ||
int * | i2 | ||
) | const |
Definition at line 119 of file PairMatchSet.cxx.
int PairMatchSet::get_match_12 | ( | int | i1 | ) | const |
Return any match for i1.
Specifically, return the second element of any tuple whose first element is i1.
Definition at line 92 of file PairMatchSet.cxx.
int PairMatchSet::get_match_21 | ( | int | i2 | ) | const |
Return any match for i2.
Specifically, return the first element of any tuple whose second element is i2. This is currently O(n) in the number of matches, consider adding an index to this class if you use it a lot.
Definition at line 110 of file PairMatchSet.cxx.
static bool MatchSet::matchp | ( | int | i | ) | [inline, static, inherited] |
Return true if i is not the "NoMatch" value.
Definition at line 32 of file MatchSet.h.
PairMatchSet & PairMatchSet::operator= | ( | const PairMatchSet & | that | ) |
Definition at line 44 of file PairMatchSet.cxx.
void PairMatchSet::print_brief | ( | vcl_ostream & | s | ) | const |
Summarize matches on stream.
Definition at line 243 of file PairMatchSet.cxx.
void PairMatchSet::print_brief | ( | ) | const |
Summarize matches on cout.
Definition at line 252 of file PairMatchSet.cxx.
bool PairMatchSet::read_ascii | ( | vcl_istream & | s | ) |
Definition at line 203 of file PairMatchSet.cxx.
void PairMatchSet::set_identity | ( | ) |
Set this match set to contain matches (i,i) for i=0..size.
Definition at line 139 of file PairMatchSet.cxx.
void PairMatchSet::set_size | ( | unsigned | size | ) |
Set the maximum allowed value of i1 to size.
Definition at line 164 of file PairMatchSet.cxx.
int PairMatchSet::size | ( | ) | const |
Return the maximum allowed value of i1.
Definition at line 158 of file PairMatchSet.cxx.
void PairMatchSet::update | ( | const vcl_vector< bool > & | inliers | ) |
Definition at line 170 of file PairMatchSet.cxx.
void PairMatchSet::update_feature_match_data | ( | ) |
Definition at line 51 of file PairMatchSet.cxx.
void PairMatchSet::write_ascii | ( | vcl_ostream & | s | ) | const |
Write matches in ASCII to stream.
Definition at line 188 of file PairMatchSet.cxx.
vcl_ostream& operator<< | ( | vcl_ostream & | s, |
const PairMatchSet & | cc | ||
) | [friend] |
Definition at line 197 of file PairMatchSet.cxx.
vcl_istream& operator>> | ( | vcl_istream & | s, |
PairMatchSet & | cc | ||
) | [friend] |
Definition at line 236 of file PairMatchSet.cxx.
unsigned int PairMatchSet::match_count_ [private] |
Definition at line 38 of file PairMatchSet.h.
vcl_vector<int> PairMatchSet::matches_ [private] |
Definition at line 37 of file PairMatchSet.h.