In file ../include/ling_class/EST_Relation.h:

## class EST_Relation

> Relations are a container class for EST_Items.

### Public Fields

  EST_Features | f Features which belong to the relation rather than its items

### Public Methods

  | EST_Relation () default constructor
  | EST_Relation (const EST_String &name) Constructor which sets name of relation
  | EST_Relation (const EST_Relation &r) Constructor which copies relation r
  | ~EST_Relation () default destructor
  void | evaluate_features () Evaluate the relation's feature functions
  void | evaluate_item_features () Evaluate the feature functions of all the items in the relation
  void | clear () Clear the relation of items
  EST_Utterance* | utt (void) Return the <link linkend="est-utterance">EST_Utterance</link> to which this relation belongs
  void | set_utt (EST_Utterance* u) Set the <link linkend="est-utterance">EST_Utterance</link> to which this relation belongs
  const EST_String& | name () const Return the name of the relation
  EST_Item* | head () const Return the head (first) item of the relation
  EST_Item* | root () const Return the root item of the relation
  EST_Item* | tail () const Return the tail (last) item of the relation
  int | empty () const return true if relation does not contain any items
  void | remove_item (EST_Item* item) remove EST_Item <parameter>item</parameter> from relation
  void | remove_item_feature (const EST_String &name) remove all occurances of feature <parameter>name</parameter> from relation's items
  EST_read_status | load (const EST_String &filename, const EST_String &type="esps") Load relation from file
  EST_read_status | load (const EST_String &filename, EST_TokenStream &ts, const EST_String &type) Load relation from already open tokenstream
  EST_write_status | save (const EST_String &filename, bool evaluate_ff = false) const Save relation to file
  EST_write_status | save (const EST_String &filename, const EST_String &type, bool evaluate_ff = false) const Save relation to file, evaluating all feature functions before hand
  EST_write_status | save (ostream &outf, EST_TKVL<void* , int> contents) const Save relation from already open ostream
  EST_write_status | save (ostream &outf, const EST_String &type, bool evaluate_ff) const Save relation from already open ostream

### Public

  | Return the tail (last) item of the relation
  | Load relation from already open tokenstream
  typedef EST_Relation_Iterator | Iterator Iteration

## Documentation

> Relations are a container class for EST_Items. Three types of relation structure are supported:

> <variablelist>

> <varlistentry><term>Linear lists</term><listitem></listitem></varlistentry> <varlistentry><term>Trees</term><listitem></listitem></varlistentry> <varlistentry><term>Multi-linear structures</term><listitem> as used in autosegmental phonology etc</listitem></varlistentry>

> </variablelist>

`EST_Relation()`
  default constructor

`EST_Relation(const EST_String &name)`
  Constructor which sets name of relation

`EST_Relation(const EST_Relation &r)`
  Constructor which copies relation r

`~EST_Relation()`
  default destructor

`EST_Features f`
  Features which belong to the relation rather than its items

`void evaluate_features()`
  Evaluate the relation's feature functions

`void evaluate_item_features()`
  Evaluate the feature functions of all the items in the relation

`void clear()`
  Clear the relation of items

`EST_Utterance* utt(void)`
  Return the <link linkend="est-utterance">EST_Utterance</link> to which this relation belongs

`void set_utt(EST_Utterance* u)`
  Set the <link linkend="est-utterance">EST_Utterance</link> to which this relation belongs

`const EST_String& name() const`
  Return the name of the relation

`EST_Item* head() const`
  Return the head (first) item of the relation

`EST_Item* root() const`
  Return the root item of the relation

`EST_Item* tail() const`
  Return the tail (last) item of the relation

`Return the tail (last) item of the relation`
  Return the tail (last) item of the relation

`int empty() const`
  return true if relation does not contain any items

`void remove_item(EST_Item* item)`
  remove EST_Item <parameter>item</parameter> from relation

`void remove_item_feature(const EST_String &name)`
  remove all occurances of feature <parameter>name</parameter> from relation's items

`EST_read_status load(const EST_String &filename, const EST_String &type="esps")`
  Load relation from file

`Load relation from already open tokenstream`
  Load relation from already open tokenstream

`EST_read_status load(const EST_String &filename, EST_TokenStream &ts, const EST_String &type)`
  Load relation from already open tokenstream

`EST_write_status save(const EST_String &filename, bool evaluate_ff = false) const`
  Save relation to file

`EST_write_status save(const EST_String &filename, const EST_String &type, bool evaluate_ff = false) const`
  Save relation to file, evaluating all feature functions before hand

`EST_write_status save(ostream &outf, EST_TKVL<void* , int> contents) const`
  Save relation from already open ostream

`EST_write_status save(ostream &outf, const EST_String &type, bool evaluate_ff) const`
  Save relation from already open ostream

`typedef EST_Relation_Iterator Iterator`
  Iteration

This class has no child classes.

Friends:
  ostream& operator << (ostream &s, const EST_Relation &u)
  class EST_Item

Alphabetic index HTML hierarchy of classes or Java

This page is part of the Edinburgh Speech Tools Library documentation
Copyright University of Edinburgh 1997
Contact: speech_tools@cstr.ed.ac.uk