Transform
A Transform is a mechanism for changing a source name into a new, modified name. Transforming names is useful for adding some determinism in name generation or for creating iterations on an established name. Transform can have an optional condition that must be fulfilled for a transformation to occur.
Implements: IPotentialAction, Archigen.IWeighted, INameTransformer, IRandomizable
Constructors
Methods
Properties
Chance
System.Double
The probability this Transform will attempt to change a name when Syllabore.Transform.Apply is called. The value must be a double between 0 and 1 inclusive. Note that each TransformStep in this Transform can also have its own chance value.
ConditionalIndex
System.Nullable <System.Int32>
The index of the syllable that the condition operates on. A negative index can be provided to traverse right-to-left from the end of the name instead.
ConditionalRegex
System.String
A regular expression that must be satisfied for the transform to be applied.
Random
System.Random
Used to simulate randomness.
Steps
System.Collections.Generic.List <TransformStep>
The TransformStep that this transform will execute.
Weight
System.Int32
A positive integer that influences the probability of this transform being used over others. Given two transforms X and Y with a weight of 3 and 1 respectively, transform X will be applied 75% of the time. All transforms default to a weight of 1.
Last updated