C# Class natix.SimilaritySearch.BinPerms

The binary encoded permutations (BriefPermutations) index
Inheritance: Perms
Show file Open project: sadit/natix

Public Properties

Property Type Description
IndexHamming Index
MOD int
permcenter bool

Public Methods

Method Description
BinPerms ( ) : System

Constructor

Build ( MetricDB db, MetricDB refs, int maxcand = 1024, double mod = 0.5, bool permcenter = true, Perms idxperms = null ) : void

The API Build method for BinPerms

Build ( MetricDB db, int num_refs, int maxcand = 1024, double mod = 0.5, bool permcenter = true ) : void
Encode ( Int16 inv ) : byte[]

Encode an inverse permutation into an encoded bit-string

Encode ( object u ) : byte[]

Performs encoding of an object

GetDimLengthInBytes ( int invlen ) : int

The length of the dimension in bytes (vector's length in bytes of the bit string)

Load ( BinaryReader Input ) : void
Save ( BinaryWriter Output ) : void
SearchKNN ( object q, int k ) : IResult

KNN Search in the index

Method Details

BinPerms() public method

Constructor
public BinPerms ( ) : System
return System

Build() public method

The API Build method for BinPerms
public Build ( MetricDB db, MetricDB refs, int maxcand = 1024, double mod = 0.5, bool permcenter = true, Perms idxperms = null ) : void
db MetricDB
refs MetricDB
maxcand int
mod double
permcenter bool
idxperms Perms
return void

Build() public method

public Build ( MetricDB db, int num_refs, int maxcand = 1024, double mod = 0.5, bool permcenter = true ) : void
db MetricDB
num_refs int
maxcand int
mod double
permcenter bool
return void

Encode() public method

Encode an inverse permutation into an encoded bit-string
public Encode ( Int16 inv ) : byte[]
inv System.Int16 /// Inverse permutation /// A ///
return byte[]

Encode() public method

Performs encoding of an object
public Encode ( object u ) : byte[]
u object
return byte[]

GetDimLengthInBytes() public method

The length of the dimension in bytes (vector's length in bytes of the bit string)
public GetDimLengthInBytes ( int invlen ) : int
invlen int
return int

Load() public method

public Load ( BinaryReader Input ) : void
Input System.IO.BinaryReader
return void

Save() public method

public Save ( BinaryWriter Output ) : void
Output System.IO.BinaryWriter
return void

SearchKNN() public method

KNN Search in the index
public SearchKNN ( object q, int k ) : IResult
q object /// The query object ///
k int /// The number of nearest neighbors /// A ///
return IResult

Property Details

IndexHamming public property

The name of the hamming index (external index)
public Index IndexHamming
return Index

MOD public property

The module
public int MOD
return int

permcenter public property

Indicates if the index will permute the center
public bool permcenter
return bool