C# Class CFGLib.Production

This class represents a Production
Afficher le fichier Open project: ellisonch/CFGLib Class Usage Examples

Méthodes publiques

Méthode Description
Production ( Nonterminal lhs, Sentence rhs, double weight = 1.0 ) : System

Returns a new production.

Production ( Nonterminal lhs, Word rhsOnlyWord, double weight = 1.0 ) : System
Production ( string lhsName, Sentence rhs, double weight = 1.0 ) : System
Production ( string lhsName, Word rhsOnlyWord, double weight = 1.0 ) : System
ToCodeString ( ) : string
ToString ( ) : string
ToStringNoWeight ( ) : string
ValueEquals ( Production other ) : bool

Checks whether the productions have the same parts

Private Methods

Méthode Description
DeepClone ( ) : Production

Returns a new Production with constituent pieces equivalent to this Production. The Rhs is a new Sentence, so that any piece of the new Production can be changed without changing the old Production.

IsUnit ( ) : bool

Method Details

Production() public méthode

Returns a new production.
public Production ( Nonterminal lhs, Sentence rhs, double weight = 1.0 ) : System
lhs Nonterminal
rhs Sentence
weight double
Résultat System

Production() public méthode

public Production ( Nonterminal lhs, Word rhsOnlyWord, double weight = 1.0 ) : System
lhs Nonterminal
rhsOnlyWord Word
weight double
Résultat System

Production() public méthode

public Production ( string lhsName, Sentence rhs, double weight = 1.0 ) : System
lhsName string
rhs Sentence
weight double
Résultat System

Production() public méthode

public Production ( string lhsName, Word rhsOnlyWord, double weight = 1.0 ) : System
lhsName string
rhsOnlyWord Word
weight double
Résultat System

ToCodeString() public méthode

public ToCodeString ( ) : string
Résultat string

ToString() public méthode

public ToString ( ) : string
Résultat string

ToStringNoWeight() public méthode

public ToStringNoWeight ( ) : string
Résultat string

ValueEquals() public méthode

Checks whether the productions have the same parts
public ValueEquals ( Production other ) : bool
other Production
Résultat bool