C# Class Ocronet.Dynamic.OcroFST.PriorityQueue

Datei anzeigen Open project: nickun/OCRonet

Public Methods

Method Description
Add ( int id, int tag, float value ) : bool

Add the id with the corresponding value

AddReplacingId ( int id, int tag, float value ) : bool

This function will move the existing id up instead of creating a new one. Origin name: add_replacing_id

Clear ( ) : void

remove all elements

FindId ( int id ) : int

Origin name: find_id

Length ( ) : int

get the number of elements in the NBest structure (between 0 and n)

MoveValue ( int id, int tag, float value, int start, int end ) : void

Origin name: move_value

PriorityQueue ( int n ) : System

constructor for a NBest data structure of size n

Tag ( int i ) : int
Value ( int i ) : float

get the value corresponding to rank i

this ( int index ) : int

get the id corresponding to rank i

Method Details

Add() public method

Add the id with the corresponding value
public Add ( int id, int tag, float value ) : bool
id int
tag int
value float
return bool

AddReplacingId() public method

This function will move the existing id up instead of creating a new one. Origin name: add_replacing_id
public AddReplacingId ( int id, int tag, float value ) : bool
id int
tag int
value float
return bool

Clear() public method

remove all elements
public Clear ( ) : void
return void

FindId() public method

Origin name: find_id
public FindId ( int id ) : int
id int
return int

Length() public method

get the number of elements in the NBest structure (between 0 and n)
public Length ( ) : int
return int

MoveValue() public method

Origin name: move_value
public MoveValue ( int id, int tag, float value, int start, int end ) : void
id int
tag int
value float
start int
end int
return void

PriorityQueue() public method

constructor for a NBest data structure of size n
public PriorityQueue ( int n ) : System
n int
return System

Tag() public method

public Tag ( int i ) : int
i int
return int

Value() public method

get the value corresponding to rank i
public Value ( int i ) : float
i int
return float

this() public method

get the id corresponding to rank i
public this ( int index ) : int
index int
return int