public class InterpolationFactory
extends java.lang.Object
构造器和说明 |
---|
InterpolationFactory() |
限定符和类型 | 方法和说明 |
---|---|
private static void |
checkAttributeLength(java.lang.String[] attribute)
dealt with exception of the element of attributes size overflow, supposed to be 2
|
private static void |
checkAttributeName(java.lang.String[] attribute,
java.lang.String expectation)
dealt with exception of attributes disorder
|
private static void |
checkAttributesSize(java.util.List<java.lang.String[]> attributes,
int expectation)
dealt with the exception of attributes size overflow
|
private static void |
checkFloatBound(java.lang.String name,
java.lang.String attribute,
float upperBound,
float lowerBound)
check if a float value locals within a given bound
|
private static void |
checkPositiveInteger(java.lang.String attribute)
dealt with exception of negative integer
|
private static AverageInterpolation |
createAverage(java.util.List<java.lang.String[]> attributes)
Creates an implementation createInterpolation of
AverageInterpolation |
private static ConservativeInterpolation |
createConservative(java.util.List<java.lang.String[]> attributes)
Creates an implementation createInterpolation of
ConservativeInterpolation |
private static FixedValueInterpolation |
createFixedValue(java.util.List<java.lang.String[]> attributes)
Creates an implementation createInterpolation of
FixedValueInterpolation |
static Interpolation |
createInterpolation(java.lang.String method,
java.util.List<java.lang.String[]> attributes)
Creates an implementation createInterpolation of
Interpolation according to
given method, and the attributes respectively |
private static NNearestNeighborInterpolation |
createNNearestNeighbor(java.util.List<java.lang.String[]> attributes)
Creates an implementation createInterpolation of
NNearestNeighborInterpolation |
private static PatchRecoveryInterpolation |
createPatchRecovery(java.util.List<java.lang.String[]> attributes)
Creates an implementation createInterpolation of
PatchRecoveryInterpolation |
private static SmoothedPatchRecoveryInterpolation |
createSmoothedPatchRecovery(java.util.List<java.lang.String[]> attributes)
Creates an implementation createInterpolation of
SmoothedPatchRecoveryInterpolation |
private static Source2TargetMapInterpolation |
createSource2TargetMap(java.util.List<java.lang.String[]> attributes)
Creates an implementation createInterpolation of
Source2TargetMapInterpolation |
private static UserFileInterpolation |
createUserFile(java.util.List<java.lang.String[]> attributes)
Creates an implementation createInterpolation of
UserFileInterpolation |
public static Interpolation createInterpolation(java.lang.String method, java.util.List<java.lang.String[]> attributes)
Interpolation
according to
given method, and the attributes respectivelymethod
- String representation of InterpolationMethod
attributes
- List of parameters with a concrete InterpolationMethodInterpolationMethod
.private static AverageInterpolation createAverage(java.util.List<java.lang.String[]> attributes)
AverageInterpolation
attributes
- List of parameters of AverageInterpolation: partial coverage, weighted
the order of element attributes follows Alphabetical orderAverageInterpolation
.private static NNearestNeighborInterpolation createNNearestNeighbor(java.util.List<java.lang.String[]> attributes)
NNearestNeighborInterpolation
attributes
- List of parameters of NNearestNeighborInterpolation: n, weighted
n is the number of source point values requested for the nearest neighbor interpolation
the order of element attributes follows Alphabetical orderNNearestNeighborInterpolation
.private static ConservativeInterpolation createConservative(java.util.List<java.lang.String[]> attributes)
ConservativeInterpolation
attributes
- List of parameters of ConservativeInterpolation: enforced conservation, partial coverage, normalisation
the order of element attributes follows Alphabetical order when they are read from xml
meaning attributes[0] -> enforced conservation, attributes[1] -> normalisation, attributes[2] -> partial coverageConservativeInterpolation
.private static PatchRecoveryInterpolation createPatchRecovery(java.util.List<java.lang.String[]> attributes)
PatchRecoveryInterpolation
attributes
- List of parameters of PatchRecoveryInterpolation: allow extrapolation, extend source patch, polynomial order, gauss order
the order of element attributes follows Alphabetical order when they are read from xml
meaning attributes[0] -> allow extrapolation, attributes[1] -> extend source patch, attributes[2] -> guass order, attributes[3] -> polynomial orderPatchRecoveryInterpolation
.private static FixedValueInterpolation createFixedValue(java.util.List<java.lang.String[]> attributes)
FixedValueInterpolation
attributes
- List of parameters of FixedValueInterpolation: allow extrapolation, extend source patch, polynomial order, gauss orderFixedValueInterpolation
.private static UserFileInterpolation createUserFile(java.util.List<java.lang.String[]> attributes)
UserFileInterpolation
attributes
- List of parameters of UserFileInterpolation: allow extrapolation, extend source patch, polynomial order, gauss order
the order of element attributes follows Alphabetical order when they are read from xml
meaning attributes[0] -> allow extrapolation, attributes[1] -> extend source patch, attributes[2] -> guass order, attributes[3] -> polynomial orderUserFileInterpolation
.private static Source2TargetMapInterpolation createSource2TargetMap(java.util.List<java.lang.String[]> attributes)
Source2TargetMapInterpolation
attributes
- List of parameters of Source2TargetMapInterpolation: allow extrapolation, extend source patch, polynomial order, gauss order
the order of element attributes follows Alphabetical order when they are read from xml
meaning attributes[0] -> allow extrapolation, attributes[1] -> extend source patch, attributes[2] -> guass order, attributes[3] -> polynomial orderSource2TargetMapInterpolation
.private static SmoothedPatchRecoveryInterpolation createSmoothedPatchRecovery(java.util.List<java.lang.String[]> attributes)
SmoothedPatchRecoveryInterpolation
attributes
- List of parameters of SmoothedPatchRecoveryInterpolation: allow extrapolation, extend source patch, polynomial order, gauss order, allow corner weight, corner weight
the order of element attributes follows Alphabetical order when they are read from xml
meaning attributes[0] -> allow corner weight, attributes[1] -> allow extrapolation, attributes[2] -> corner weight,
attributes[3] -> extend source patch, attributes[4] -> gauss order, attributes[5]-> polynomial orderSmoothedPatchRecoveryInterpolation
.private static void checkAttributesSize(java.util.List<java.lang.String[]> attributes, int expectation) throws java.lang.IllegalArgumentException
attributes
- List of parameters of a InterpolationMethodexpetation
- the number of parameters that the InterpolationMethod requiresjava.lang.IllegalArgumentException
private static void checkAttributeLength(java.lang.String[] attribute) throws java.lang.IllegalArgumentException
attribute
- one parameter from attributes list including attribute[0] for the name and attribute[1] for the valueexpetation
- the number of parameters that the InterpolationMethod requiresjava.lang.IllegalArgumentException
private static void checkAttributeName(java.lang.String[] attribute, java.lang.String expectation)
attribute
- one parameter from attributes list, here only check the name attribute[0] equals to expectationexpectation
- the name of parameters that the attribute should beprivate static void checkPositiveInteger(java.lang.String attribute)
attribute
- the value of one parameter from attributes list, attribute[1]private static void checkFloatBound(java.lang.String name, java.lang.String attribute, float upperBound, float lowerBound)
name
- the parameter of a float value to be checkattribute
- the value of one parameter from attributes list, attribute[1]upperBound
- the maximum valuelowerBound
- the minimum value