public class PhaseDiagramCompositionEntryGenerator extends BaseEntryGenerator
Has two different ways of selecting compositions within phase diagrams
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.lang.Integer> |
Elements
List of elements to use (id is Z-1)
|
protected boolean |
evenSpacing
Whether to use even spacing or small integers
|
protected int |
MaxOrder
Maximum number of constituents
|
protected int |
MinOrder
Minimum number of constituents
|
protected int |
size
Either number of stops in each direction or max denominator
|
Constructor and Description |
---|
PhaseDiagramCompositionEntryGenerator() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.Integer,java.util.List<double[]>> |
generateAlloyCompositions()
Generate evenly-spaced compositions.
|
protected java.util.Map<java.lang.Integer,java.util.List<double[]>> |
generateCrystalCompositions()
Generate compositions with small denominators.
|
java.util.Iterator<BaseEntry> |
iterator() |
java.lang.String |
printUsage()
Print out required format for options.
|
void |
setElementsByIndex(java.util.Set<java.lang.Integer> Elements)
Define the lit of elements included in the phase diagrams.
|
void |
setElementsByName(java.util.Set<java.lang.String> Elements)
Define the lit of elements included in the phase diagrams.
|
void |
setEvenSpacing(boolean evenSpacing)
Set whether to use evenly-spaced compositions (or low-denominator).
|
void |
setOptions(java.util.List<java.lang.Object> Options)
Set any options for this object.
|
void |
setOrder(int minOrder,
int maxOrder)
Define the order of generated phase diagrams
|
void |
setSize(int size)
Define the number of points per binary diagram (in using even spacing) or
the maximum denominator (for low-denominator)
|
addEntriesToDataset, generateEntries, train
protected java.util.List<java.lang.Integer> Elements
protected int MinOrder
protected int MaxOrder
protected boolean evenSpacing
protected int size
public PhaseDiagramCompositionEntryGenerator()
public void setOptions(java.util.List<java.lang.Object> Options) throws java.lang.Exception
Options
Options
- Array of options as Objects - can be null
java.lang.Exception
- if problem with inputspublic java.lang.String printUsage()
Options
public void setElementsByIndex(java.util.Set<java.lang.Integer> Elements)
Elements
- List of elements by index (Z-1)public void setElementsByName(java.util.Set<java.lang.String> Elements)
Elements
- List of elements by name (ignores elements that don't match)public void setOrder(int minOrder, int maxOrder) throws java.lang.Exception
minOrder
- Minimum number of constituentsmaxOrder
- Maximum number of constituentsjava.lang.Exception
public void setEvenSpacing(boolean evenSpacing)
evenSpacing
- Whether to use even spacingpublic void setSize(int size) throws java.lang.Exception
size
- Desired size parameterjava.lang.Exception
public java.util.Iterator<BaseEntry> iterator()
protected java.util.Map<java.lang.Integer,java.util.List<double[]>> generateAlloyCompositions()
MinOrder
.
For example: If the user wants ternary diagrams with a minimum spacing of 0.25,
this code will generate the following map:
1 -> ([1.0])
2 -> ([0.25, 0.75], [0.5, 0.5], [0.75, 0.25])
3 -> ([0.5, 0.25, 0.25], [0.25, 0.5, 0.25], [0.25, 0.25, 0.5])
protected java.util.Map<java.lang.Integer,java.util.List<double[]>> generateCrystalCompositions()
MinOrder
.
For example: If the user wants ternary diagrams with a maximum denominator of 3,
this code will generate the following map:
1 -> ([1])
2 -> ([1/3, 2/3], [1/2, 1/2], [2/3, 1/3])
3 -> ([1/3, 1/3, 1/3])