name: SymbolGraphNode
synopsis:

>     g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_search.a

>     #include <SymbolGraphNode.h>

>     float getScore() const;
>     boolean setScore(const float arg);
>     long getFrameIndex() const;
>     boolean setFrameIndex(const long arg);
>     long getNodeIndex() const;
>     boolean setNodeIndex(const long arg);
>     boolean getSymbol(String& arg);
>     boolean setSymbol(const String& arg);
>     long getIncoming() const;
>     long getOutgoing() const;
>     long getRefCount();
>     boolean incrementRefCount();
>     boolean decrementRefCount();
>     SymbolGraph* getParentGraph() const;
>     boolean setParentGraph(SymbolGraph* ptr);
>     SingleLinkedList<SymbolGraphNode>& getPrevNodesList();
>     SingleLinkedList<SymbolGraphNode>& getNextNodesList();
>     SingleLinkedList<Float>& getPrevScoresList();
>     SingleLinkedList<Float>& getPrevLMScoresList();
>     SingleLinkedList<Float>& getLMScoresList();
>     SingleLinkedList<Float>& getScoresList();
>     boolean getScores(SymbolGraphNode* node, float& lm_score, float& ac_score);
>     boolean insertPrevNode(SymbolGraphNode*& node, float score, long max_hist, float lm_score);
>     boolean insertNextNode(SymbolGraphNode*& node, float lm_score, float ac_score);
>     boolean insertNode(SymbolGraphNode* node_a, SymbolGraphNode** lnode_a, long*& map_list_a);
>     boolean insertNode(SymbolGraphNode* node_a, float lm_score_a, float ac_score_a, SymbolGraphNode** lnode_a, long*& map_list_a);

quick start:

>     Trace trace;
>     SymbolGraphNode* symbol_node;

>     symbol_node = trace.getSymbolNode();
>     symbol_node.setFrameIndex((long)0);
>     symbol_node.setParentGraph(this);

description:
This class represents the node data structure that is used in the combination with the SymbolGraph class to represent a word-graph, which is used for the word-graph generation and rescoring modes in the recognizer.
dependencies:

- Long.h
- Float.h
- String.h

public constants:

- define public constants:

      static const String CLASS_NAME;

      static const String DEF_PARAM;

      static const long DEF_NODE_INDEX = 0;

      static const long DEF_FRAME_INDEX = -1;

      static const long DEF_REFERENCE_COUNT = 0;

      static const long DEF_IN_DEGREE = 0;

      static const long DEF_OUT_DEGREE = 0;

      static const float DEF_SCORE = 0.0;

error codes:

- error codes indicating general errors:

protected data:

- define the symbol index:

      String symbol_d;

- define the frame index:

      Long node_index_d;

- define the frame index:

      Long frame_index_d;

- define the reference count for this node:

      Long reference_count_d;

- define the node statistics:

      Long num_arcs_in_d;

      Long num_arcs_out_d;

- define the maximum path score for this node:

      Float score_d;

- define incoming and outgoing connections:

      SingleLinkedList<SymbolGraphNode> prev_nodes_d;

      SingleLinkedList<SymbolGraphNode> next_nodes_d;

- define the list of previous scores:

      SingleLinkedList<Float> prev_scores_d;

      SingleLinkedList<Float> prevlm_scores_d;

- define the forward acoustic and language model scores:

      SingleLinkedList<Float> lm_scores_d;

      SingleLinkedList<Float> ac_scores_d;

- define the pointer to the parent graph:

      SymbolGraph* parent_graph_d;

- declare the memory manager:

      static MemoryManager mgr_d;

- declare the debugging parameters:

      static Integral::DEBUG debug_level_d;

required public methods:

- static methods:

      static const String& name();

- debug methods:

      static boolean diagnose(Integral::DEBUG debug_level);

      static boolean setDebug(Integral::DEBUG debug_level);

- destructor/constructor(s):

      ~SymbolGraphNode();

      SymbolGraphNode();

      SymbolGraphNode(long index, const String& symbol);

      SymbolGraphNode(const SymbolGraphNode& copy_node);

- assign methods:

      boolean assign(const SymbolGraphNode& copy_node);

- operator= method:

      SymbolGraphNode& operator=(const SymbolGraphNode& arg);

- i/o methods:

      long sofSize() const;

      boolean read(Sof& sof, long tag, const String& cname = CLASS_NAME);

      boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);

      boolean write(Sof& sof, long tag, const String& cname = CLASS_NAME) const;

      boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;

- equality methods:

      boolean eq(const SymbolGraphNode& obj) const;

- memory management methods:

      static void* operator new(size_t size);

      static void* operator new[](size_t size);

      static void operator delete(void* ptr);

      static void operator delete[](void* ptr);

      static boolean setGrowSize(long grow_size);

      boolean clear(Integral::CMODE ctype = Integral::DEF_CMODE);

class-specific public methods:

- declare class specific methods:

      float getScore() const;

      boolean setScore(const float arg);

      long getFrameIndex() const;

      boolean setFrameIndex(const long arg);

      long getNodeIndex() const;

      boolean setNodeIndex(const long arg);

      boolean getSymbol(String& arg);

      boolean setSymbol(const String& arg);

      long getIncoming() const;

      long getOutgoing() const;

      long getRefCount();

      boolean incrementRefCount();

      boolean decrementRefCount();

      SymbolGraph* getParentGraph() const;

      boolean setParentGraph(SymbolGraph* ptr);

      SingleLinkedList<SymbolGraphNode>& getPrevNodesList();

      SingleLinkedList<SymbolGraphNode>& getNextNodesList();

      SingleLinkedList<Float>& getPrevScoresList();

      SingleLinkedList<Float>& getPrevLMScoresList();

      SingleLinkedList<Float>& getLMScoresList();

      SingleLinkedList<Float>& getScoresList();

      boolean getScores(SymbolGraphNode* node, float& lm_score, float& ac_score);

      boolean insertPrevNode(SymbolGraphNode*& node, float score, long max_hist, float lm_score);

      boolean insertNextNode(SymbolGraphNode*& node, float lm_score, float ac_score);

      boolean insertNode(SymbolGraphNode* node, SymbolGraphNode** lnode, long*& map_list);

      boolean insertNode(SymbolGraphNode* node, float lm_score, float ac_score, SymbolGraphNode** lnode, long*& map_list);

private methods:

- none.

examples:

- none.

notes:

- none.