public class Proposal extends Object
| Constructor and Description |
|---|
Proposal()
Create a new instance with a WELL RNG with the current time as the seed.
|
Proposal(long seed)
Create a new instance with a WELL RNG with the given seed.
|
Proposal(org.apache.commons.math3.random.RandomGenerator rg)
Create a new instance with the given random number sequence.
|
| Modifier and Type | Method and Description |
|---|---|
TreeSample<Integer> |
getRawTreeSample(RuleWeighting guide,
int sampleSize)
Get a sample of trees with label IDs for the rules sampled.
|
TreeSample<String> |
getStringTreeSample(RuleWeighting guide,
int sampleSize)
Returns a sample of string trees by transforming sampled rule trees.
|
<Type> TreeSample<Type> |
getTreeSample(BiFunction<Rule,TreeAutomaton,Type> mapping,
RuleWeighting guide,
int numberOfSamples)
This method samples a number of rule trees and transforms them into the desired type of tree
by applying the mapping to the tree and the automaton the guide returns.
|
TreeSample<Rule> |
getTreeSample(RuleWeighting guide,
int sampleSize)
Returns a sample of rule trees.
|
public Proposal(org.apache.commons.math3.random.RandomGenerator rg)
rg - public Proposal(long seed)
seed - public Proposal()
public TreeSample<Integer> getRawTreeSample(RuleWeighting guide, int sampleSize)
guide - sampleSize - public TreeSample<Rule> getTreeSample(RuleWeighting guide, int sampleSize)
guide - sampleSize - public TreeSample<String> getStringTreeSample(RuleWeighting guide, int sampleSize)
guide - sampleSize - public <Type> TreeSample<Type> getTreeSample(BiFunction<Rule,TreeAutomaton,Type> mapping, RuleWeighting guide, int numberOfSamples)
Type - The label type of the trees.mapping - guide - numberOfSamples - Copyright © 2017. All rights reserved.