C# Class natix.SimilaritySearch.LSH

Abstract class for locality sensitive hashing
Inheritance: BasicIndex
Mostra file Open project: sadit/natix

Public Properties

Property Type Description
DEFAULT_QUERY_EXPANSION int
Width int

Protected Properties

Property Type Description
invindex InvertedIndex

Public Methods

Method Description
Build ( MetricDB db, int width, Random rand, InvertedIndex>.Func create_invertedindex = null, object>.Func get_item = null ) : void
ComputeHash ( object u ) : int
GetCandidates ( int hash, HashSet cand, int expansion = -1 ) : void
LSH ( ) : System

Constructor

Load ( BinaryReader Input ) : void
PreBuild ( Random rand, object firstObject ) : void
Save ( BinaryWriter Output ) : void
SearchKNN ( object q, int K, IResult R ) : IResult
SearchKNNExpansion ( object q, IResult R, int expansion ) : void

Method Details

Build() public method

public Build ( MetricDB db, int width, Random rand, InvertedIndex>.Func create_invertedindex = null, object>.Func get_item = null ) : void
db MetricDB
width int
rand System.Random
create_invertedindex InvertedIndex>.Func
get_item object>.Func
return void

ComputeHash() public abstract method

public abstract ComputeHash ( object u ) : int
u object
return int

GetCandidates() public method

public GetCandidates ( int hash, HashSet cand, int expansion = -1 ) : void
hash int
cand HashSet
expansion int
return void

LSH() public method

Constructor
public LSH ( ) : System
return System

Load() public method

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

PreBuild() public abstract method

public abstract PreBuild ( Random rand, object firstObject ) : void
rand System.Random
firstObject object
return void

Save() public method

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

SearchKNN() public method

public SearchKNN ( object q, int K, IResult R ) : IResult
q object
K int
R IResult
return IResult

SearchKNNExpansion() public method

public SearchKNNExpansion ( object q, IResult R, int expansion ) : void
q object
R IResult
expansion int
return void

Property Details

DEFAULT_QUERY_EXPANSION public_oe static_oe property

public static int DEFAULT_QUERY_EXPANSION
return int

Width public_oe property

public int Width
return int

invindex protected_oe property

Matrix. One vector per LSH function
protected InvertedIndex invindex
return InvertedIndex