public final class PMMLArrays extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PMMLArrays.ArrayType
Enumeration of PMML array types
|
Modifier and Type | Method and Description |
---|---|
static void |
addChildArrayElement(Element element,
BigDecimal[] values)
Adds a child
Array element to the given element. |
static void |
addChildArrayElement(Element element,
double[] values)
Adds a child
Array element to the given element. |
static void |
addChildArrayElement(Element element,
int[] values)
Adds a child
Array element to the given element. |
static void |
addChildArrayElement(Element element,
long[] values)
Adds a child
Array element to the given element. |
static void |
addChildArrayElement(Element element,
Object[] values,
PMMLArrays.ArrayType type)
Adds a child
Array element to the given element. |
static void |
addSparseChildArrayElement(Element element,
DoubleTokenSequence sequence)
Adds a child
REAL-SparseArray element to the given element. |
static void |
addSparseChildArrayElement(Element element,
IntTokenSequence sequence)
Adds a child
INT-SparseArray element to the given element. |
static void |
addSparseChildArrayElement(Element element,
NumericTokenSequence sequence)
Adds a child
REAL-SparseArray element to the given element. |
static BigDecimal[] |
parseChildArrayElementAsBigDecimals(Element element)
Parses the single child
Array element as an array of BigDecimals. |
static double[] |
parseChildArrayElementAsDoubles(Element element)
Parses the single child
Array element as an array of doubles. |
static int[] |
parseChildArrayElementAsInts(Element element)
Parses the single child
Array element as an array of ints. |
static String[] |
parseChildArrayElementAsStrings(Element element)
Parses the single child
Array element as an array of strings. |
static BigDecimal[][] |
parseChildArrayElementsAsBigDecimals(Element element)
Parses all child
Array elements as arrays of BigDecimals. |
static Double[][] |
parseChildArrayElementsAsDoubles(Element element)
Parses all child
Array elements as arrays of doubles. |
static String[][] |
parseChildArrayElementsAsStrings(Element element)
Parses all child
Array elements as arrays of strings. |
static DoubleTokenSequence |
parseSparseChildArrayElement(Element element)
Parses the single child
REAL-SparseArray or INT-SparseArray element. |
public static void addChildArrayElement(Element element, double[] values)
Array
element to the given element. The child array will
be of type PMMLArrays.ArrayType.real
.element
- the parent elementvalues
- the values of the arraypublic static void addChildArrayElement(Element element, BigDecimal[] values)
Array
element to the given element. The child array will
be of type PMMLArrays.ArrayType.real
.element
- the parent elementvalues
- the values of the arraypublic static void addChildArrayElement(Element element, int[] values)
Array
element to the given element. The child array will
be of type PMMLArrays.ArrayType.integer
.element
- the parent elementvalues
- the values of the arraypublic static void addChildArrayElement(Element element, long[] values)
Array
element to the given element. The child array will
be of type PMMLArrays.ArrayType.integer
.element
- the parent elementvalues
- the values of the arraypublic static void addChildArrayElement(Element element, Object[] values, PMMLArrays.ArrayType type)
Array
element to the given element. The child array will
be of the specified typeelement
- the parent elementvalues
- the values of the arraytype
- the type of the elements of the arraypublic static void addSparseChildArrayElement(Element element, DoubleTokenSequence sequence)
REAL-SparseArray
element to the given element.element
- the parent elementsequence
- the sequence (generally a sparse sequence)public static void addSparseChildArrayElement(Element element, NumericTokenSequence sequence)
REAL-SparseArray
element to the given element.element
- the parent elementsequence
- the sequence (generally a sparse sequence)public static void addSparseChildArrayElement(Element element, IntTokenSequence sequence)
INT-SparseArray
element to the given element.element
- the parent elementsequence
- the sequence (generally a sparse sequence)public static String[][] parseChildArrayElementsAsStrings(Element element)
Array
elements as arrays of strings. The type declared in the PMML is ignored.element
- the parent elementpublic static Double[][] parseChildArrayElementsAsDoubles(Element element)
Array
elements as arrays of doubles. The type declared in the PMML is ignored.element
- the parent elementpublic static BigDecimal[][] parseChildArrayElementsAsBigDecimals(Element element)
Array
elements as arrays of BigDecimals. The type declared in the PMML is ignored.element
- the parent elementpublic static String[] parseChildArrayElementAsStrings(Element element)
Array
element as an array of strings. The type declared in the PMML is ignored.element
- the parent elementInvalidPMMLException
- if there are multiple children arrayspublic static double[] parseChildArrayElementAsDoubles(Element element)
Array
element as an array of doubles. The type declared in the PMML is ignored.element
- the parent elementInvalidPMMLException
- if there are multiple children arrayspublic static BigDecimal[] parseChildArrayElementAsBigDecimals(Element element)
Array
element as an array of BigDecimals. The type declared in the PMML is ignored.element
- the parent elementInvalidPMMLException
- if there are multiple children arrayspublic static int[] parseChildArrayElementAsInts(Element element)
Array
element as an array of ints. The type declared in the PMML is ignored.element
- the parent elementInvalidPMMLException
- if there are multiple children arrayspublic static DoubleTokenSequence parseSparseChildArrayElement(Element element)
REAL-SparseArray
or INT-SparseArray
element.element
- the parent elementInvalidPMMLException
- if there are multiple children arraysCopyright © 2024 Actian Corporation. All rights reserved.