DMatch
Objective-C
@interface DMatch : NSObject
Swift
class DMatch : NSObject
Structure for matching: query descriptor index, train descriptor index, train image index and distance between descriptors.
-
Query descriptor index.
Declaration
Objective-C
@property int queryIdx;
Swift
var queryIdx: Int32 { get set }
-
Train descriptor index.
Declaration
Objective-C
@property int trainIdx;
Swift
var trainIdx: Int32 { get set }
-
Train image index.
Declaration
Objective-C
@property int imgIdx;
Swift
var imgIdx: Int32 { get set }
-
Distance
Declaration
Objective-C
@property float distance;
Swift
var distance: Float { get set }
-
Declaration
Objective-C
- (instancetype)init;
Swift
init()
-
Declaration
Objective-C
- (instancetype)initWithQueryIdx:(int)queryIdx trainIdx:(int)trainIdx distance:(float)distance;
Swift
init(queryIdx: Int32, trainIdx: Int32, distance: Float)
-
Declaration
Objective-C
- (instancetype)initWithQueryIdx:(int)queryIdx trainIdx:(int)trainIdx imgIdx:(int)imgIdx distance:(float)distance;
Swift
init(queryIdx: Int32, trainIdx: Int32, imgIdx: Int32, distance: Float)
-
Distance comparison
Declaration
Objective-C
- (BOOL)lessThan:(nonnull DMatch *)it;
Swift
func lessThan(_ it: DMatch) -> Bool
Parameters
it
DMatch object to compare
-
Clone object
Declaration
Objective-C
- (nonnull DMatch *)clone;
Swift
func clone() -> DMatch
-
Compare for equality
Declaration
Objective-C
- (BOOL)isEqual:(nullable id)other;
Swift
func isEqual(_ other: Any?) -> Bool
Parameters
other
Object to compare
-
Calculate hash for this object
Declaration
Objective-C
- (NSUInteger)hash;
Swift
func hash() -> UInt
-
Returns a string that describes the contents of the object
Declaration
Objective-C
- (nonnull NSString *)description;
Swift
func description() -> String