C# Class CFGLib.Production

This class represents a Production
Datei anzeigen Open project: ellisonch/CFGLib Class Usage Examples

Public Methods

Method 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

Method 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 method

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

Production() public method

public Production ( Nonterminal lhs, Word rhsOnlyWord, double weight = 1.0 ) : System
lhs Nonterminal
rhsOnlyWord Word
weight double
return System

Production() public method

public Production ( string lhsName, Sentence rhs, double weight = 1.0 ) : System
lhsName string
rhs Sentence
weight double
return System

Production() public method

public Production ( string lhsName, Word rhsOnlyWord, double weight = 1.0 ) : System
lhsName string
rhsOnlyWord Word
weight double
return System

ToCodeString() public method

public ToCodeString ( ) : string
return string

ToString() public method

public ToString ( ) : string
return string

ToStringNoWeight() public method

public ToStringNoWeight ( ) : string
return string

ValueEquals() public method

Checks whether the productions have the same parts
public ValueEquals ( Production other ) : bool
other Production
return bool