C# Class natix.SimilaritySearch.BinQ8HammingSpace

Hamming space for bit strings
Inheritance: MetricDB
Exibir arquivo Open project: sadit/natix Class Usage Examples

Public Properties

Property Type Description
symlen int

Protected Properties

Property Type Description
numdist long

Public Methods

Method Description
Add ( object a ) : int
BinQ8HammingSpace ( ) : System
BinQ8HammingSpace ( int symlen ) : System

Constructor

Build ( string filename ) : void

Read the database from a listing file (one filename per line)

Dist ( object a, object b ) : double

Wrap the distance to the given BinDist distance.

DistHamming ( byte a, byte b ) : double
Load ( BinaryReader Input ) : void
LoadObjectFromFile ( string name, bool save_binary_cache ) : byte[]
ObjectToAsciiString ( int docid ) : string

Converts an object to Ascii '0' and '1' using an object id

Parse ( string line ) : object

Converts 'name' into an object

ParseFromFile ( string name ) : object
ParseObjectFromString ( string data ) : byte[]
Save ( BinaryWriter Output ) : void
ToAsciiString ( IList b ) : string

Converts an object to a readeable representation in ascii '0' and '1'

ToAsciiString ( UInt16 b ) : string

Returns the string representation of an UInt16

ToAsciiString ( UInt32 b ) : string

Returns the string representation of an UInt32

ToAsciiString ( UInt64 b ) : string

Converts an UInt64 to binary (ascii format)

ToAsciiString ( byte b ) : string

Returns a string representation of a single byte

ToAsciiString ( int d ) : string
this ( int docid ) : object

Indexer to retrieve an object

Method Details

Add() public method

public Add ( object a ) : int
a object
return int

BinQ8HammingSpace() public method

public BinQ8HammingSpace ( ) : System
return System

BinQ8HammingSpace() public method

Constructor
public BinQ8HammingSpace ( int symlen ) : System
symlen int
return System

Build() public method

Read the database from a listing file (one filename per line)
public Build ( string filename ) : void
filename string
return void

Dist() public method

Wrap the distance to the given BinDist distance.
public Dist ( object a, object b ) : double
a object
b object
return double

DistHamming() public static method

public static DistHamming ( byte a, byte b ) : double
a byte
b byte
return double

Load() public method

public Load ( BinaryReader Input ) : void
Input BinaryReader
return void

LoadObjectFromFile() public static method

public static LoadObjectFromFile ( string name, bool save_binary_cache ) : byte[]
name string
save_binary_cache bool
return byte[]

ObjectToAsciiString() public method

Converts an object to Ascii '0' and '1' using an object id
public ObjectToAsciiString ( int docid ) : string
docid int /// The object identifier /// A ///
return string

Parse() public method

Converts 'name' into an object
public Parse ( string line ) : object
line string
return object

ParseFromFile() public method

public ParseFromFile ( string name ) : object
name string
return object

ParseObjectFromString() public static method

public static ParseObjectFromString ( string data ) : byte[]
data string
return byte[]

Save() public method

public Save ( BinaryWriter Output ) : void
Output BinaryWriter
return void

ToAsciiString() public static method

Converts an object to a readeable representation in ascii '0' and '1'
public static ToAsciiString ( IList b ) : string
b IList
return string

ToAsciiString() public static method

Returns the string representation of an UInt16
public static ToAsciiString ( UInt16 b ) : string
b UInt16 /// A ///
return string

ToAsciiString() public static method

Returns the string representation of an UInt32
public static ToAsciiString ( UInt32 b ) : string
b UInt32 /// A ///
return string

ToAsciiString() public static method

Converts an UInt64 to binary (ascii format)
public static ToAsciiString ( UInt64 b ) : string
b UInt64
return string

ToAsciiString() public static method

Returns a string representation of a single byte
public static ToAsciiString ( byte b ) : string
b byte
return string

ToAsciiString() public static method

public static ToAsciiString ( int d ) : string
d int
return string

this() public method

Indexer to retrieve an object
public this ( int docid ) : object
docid int
return object

Property Details

numdist protected_oe property

protected long numdist
return long

symlen public_oe property

Symbol's length in bytes
The length in bytes of each symbol. For general data this should be 1, for audio MBSES this should be 3.
public int symlen
return int