public class CompositionRangeEntryGenerator extends BaseEntryGenerator
Example: Al with 0-10at% Ni and 0-10at% Zr in step sizes of 0.2at%
Usage: <base> [-min <min base fraction>]
[-max <max base fraction>]
-alloy <alloy elem> <alloy min> <alloy max> <alloy step>
[<...>]
| Modifier and Type | Field and Description |
|---|---|
protected int |
BaseElement
ID of base element
|
protected double |
MaxBaseElement
Set maximum amount of base element
|
protected java.util.SortedMap<java.lang.Integer,java.lang.Double> |
MaxFraction
Maximum fraction of certain element.
|
protected double |
MinBaseElement
Set minimum amount of base element
|
protected java.util.SortedMap<java.lang.Integer,java.lang.Double> |
MinFraction
Minimum fraction of certain element.
|
protected java.util.SortedMap<java.lang.Integer,java.lang.Double> |
StepFraction
Fraction step size of certain element.
|
| Constructor and Description |
|---|
CompositionRangeEntryGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAlloyElement(int id,
double min,
double max,
double step)
Add alloying element
|
void |
addAlloyElement(java.lang.String elem,
double min,
double max,
double step)
Add alloying element
|
void |
clearAlloyingElements()
Clear the list of elements to be added
|
protected CompositionEntry |
getNextComposition(java.util.Iterator<java.util.List<java.lang.Double>> alloyIter)
Get the next alloy composition in the sequence.
|
java.util.Iterator<BaseEntry> |
iterator() |
java.lang.String |
printUsage()
Print out required format for options.
|
void |
setBaseElement(int id,
double min,
double max)
Set the base element.
|
void |
setBaseElement(java.lang.String elem,
double min,
double max)
Set the base element.
|
void |
setOptions(java.util.List<java.lang.Object> Options)
Set any options for this object.
|
addEntriesToDataset, generateEntries, trainprotected int BaseElement
protected double MinBaseElement
protected double MaxBaseElement
protected final java.util.SortedMap<java.lang.Integer,java.lang.Double> MinFraction
protected final java.util.SortedMap<java.lang.Integer,java.lang.Double> MaxFraction
protected final java.util.SortedMap<java.lang.Integer,java.lang.Double> StepFraction
public void setOptions(java.util.List<java.lang.Object> Options)
throws java.lang.Exception
OptionsOptions - Array of options as Objects - can be nulljava.lang.Exception - if problem with inputspublic java.lang.String printUsage()
Optionspublic void setBaseElement(int id,
double min,
double max)
id - ID of desired base elementmin - Minimum allowed value of base element. Use NaN for no limitmax - Maximum allowed value of base element. Use NaN for no limitpublic void setBaseElement(java.lang.String elem,
double min,
double max)
elem - Symbol of the desired base elementmin - Minimum allowed value of base element. Use NaN for no limitmax - Maximum allowed value of base element. Use NaN for no limitpublic void clearAlloyingElements()
public void addAlloyElement(int id,
double min,
double max,
double step)
id - ID of elementmin - Minimum fraction of elementmax - Maximum fraction of elementstep - Desired step sizepublic void addAlloyElement(java.lang.String elem,
double min,
double max,
double step)
elem - Symbol of elementmin - Minimum fraction of elementmax - Maximum fraction of elementstep - Desired step sizepublic java.util.Iterator<BaseEntry> iterator()
protected CompositionEntry getNextComposition(java.util.Iterator<java.util.List<java.lang.Double>> alloyIter)
alloyIter - Iterator of alloy compositions. Created in iterator()