本文整理汇总了Java中org.datavec.api.transform.condition.ConditionOp.NotInSet方法的典型用法代码示例。如果您正苦于以下问题:Java ConditionOp.NotInSet方法的具体用法?Java ConditionOp.NotInSet怎么用?Java ConditionOp.NotInSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.datavec.api.transform.condition.ConditionOp
的用法示例。
在下文中一共展示了ConditionOp.NotInSet方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: IntegerColumnCondition
import org.datavec.api.transform.condition.ConditionOp; //导入方法依赖的package包/类
/**
* Constructor for operations such as less than, equal to, greater than, etc.
*
* @param column Column to check for the condition
* @param sequenceConditionMode Mode for handling sequence data
* @param op Operation (<, >=, !=, etc)
* @param value Value to use in the condition
*/
public IntegerColumnCondition(String column, SequenceConditionMode sequenceConditionMode, ConditionOp op,
int value) {
super(column, sequenceConditionMode);
if (op == ConditionOp.InSet || op == ConditionOp.NotInSet) {
throw new IllegalArgumentException(
"Invalid condition op: cannot use this constructor with InSet or NotInSet ops");
}
this.op = op;
this.value = value;
this.set = null;
}
示例2: TimeColumnCondition
import org.datavec.api.transform.condition.ConditionOp; //导入方法依赖的package包/类
/**
* Constructor for operations such as less than, equal to, greater than, etc.
*
* @param column Column to check for the condition
* @param sequenceConditionMode Mode for handling sequence data
* @param op Operation (<, >=, !=, etc)
* @param value Time value (in epoch millisecond format) to use in the condition
*/
public TimeColumnCondition(String column, SequenceConditionMode sequenceConditionMode, ConditionOp op, long value) {
super(column, sequenceConditionMode);
if (op == ConditionOp.InSet || op == ConditionOp.NotInSet) {
throw new IllegalArgumentException(
"Invalid condition op: cannot use this constructor with InSet or NotInSet ops");
}
this.op = op;
this.value = value;
this.set = null;
}
示例3: LongColumnCondition
import org.datavec.api.transform.condition.ConditionOp; //导入方法依赖的package包/类
/**
* Constructor for operations such as less than, equal to, greater than, etc.
*
* @param column Column to check for the condition
* @param sequenceConditionMode Mode for handling sequence data
* @param op Operation (<, >=, !=, etc)
* @param value Value to use in the condition
*/
public LongColumnCondition(String column, SequenceConditionMode sequenceConditionMode, ConditionOp op, long value) {
super(column, sequenceConditionMode);
if (op == ConditionOp.InSet || op == ConditionOp.NotInSet) {
throw new IllegalArgumentException(
"Invalid condition op: cannot use this constructor with InSet or NotInSet ops");
}
this.op = op;
this.value = value;
this.set = null;
}
示例4: CategoricalColumnCondition
import org.datavec.api.transform.condition.ConditionOp; //导入方法依赖的package包/类
/**
* Constructor for operations: ConditionOp.InSet, ConditionOp.NotInSet
*
* @param columnName Column to check for the condition
* @param sequenceConditionMode Mode for handling sequence data
* @param op Operation. Must be either ConditionOp.InSet, ConditionOp.NotInSet
* @param set Set to use in the condition
*/
public CategoricalColumnCondition(String columnName, SequenceConditionMode sequenceConditionMode, ConditionOp op,
Set<String> set) {
super(columnName, sequenceConditionMode);
if (op != ConditionOp.InSet && op != ConditionOp.NotInSet) {
throw new IllegalArgumentException(
"Invalid condition op: can ONLY use this constructor with InSet or NotInSet ops");
}
this.op = op;
this.value = null;
this.set = set;
}
示例5: StringColumnCondition
import org.datavec.api.transform.condition.ConditionOp; //导入方法依赖的package包/类
/**
* Constructor for operations: ConditionOp.InSet, ConditionOp.NotInSet
*
* @param column Column to check for the condition
* @param sequenceConditionMode Mode for handling sequence data
* @param op Operation. Must be either ConditionOp.InSet, ConditionOp.NotInSet
* @param set Set to use in the condition
*/
public StringColumnCondition(String column, SequenceConditionMode sequenceConditionMode, ConditionOp op,
Set<String> set) {
super(column, sequenceConditionMode);
if (op != ConditionOp.InSet && op != ConditionOp.NotInSet) {
throw new IllegalArgumentException(
"Invalid condition op: can ONLY use this constructor with InSet or NotInSet ops");
}
this.op = op;
this.value = null;
this.set = set;
}
示例6: DoubleColumnCondition
import org.datavec.api.transform.condition.ConditionOp; //导入方法依赖的package包/类
/**
* Constructor for operations such as less than, equal to, greater than, etc.
*
* @param column Column to check for the condition
* @param sequenceConditionMode Mode for handling sequence data
* @param op Operation (<, >=, !=, etc)
* @param value Value to use in the condition
*/
public DoubleColumnCondition(String column, SequenceConditionMode sequenceConditionMode, ConditionOp op,
double value) {
super(column, sequenceConditionMode);
if (op == ConditionOp.InSet || op == ConditionOp.NotInSet) {
throw new IllegalArgumentException(
"Invalid condition op: cannot use this constructor with InSet or NotInSet ops");
}
this.op = op;
this.value = value;
this.set = null;
}
示例7: SequenceLengthCondition
import org.datavec.api.transform.condition.ConditionOp; //导入方法依赖的package包/类
private SequenceLengthCondition(@JsonProperty("op") ConditionOp op, @JsonProperty("length") Integer length,
@JsonProperty("set") Set<Integer> set) {
if (set != null & op != ConditionOp.InSet && op != ConditionOp.NotInSet) {
throw new IllegalArgumentException(
"Invalid condition op: can only use this constructor with InSet or NotInSet ops");
}
this.op = op;
this.length = length;
this.set = set;
}
示例8: toString
import org.datavec.api.transform.condition.ConditionOp; //导入方法依赖的package包/类
@Override
public String toString() {
return "IntegerColumnCondition(columnName=\"" + columnName + "\"," + op + ","
+ (op == ConditionOp.NotInSet || op == ConditionOp.InSet ? set : value) + ")";
}
示例9: toString
import org.datavec.api.transform.condition.ConditionOp; //导入方法依赖的package包/类
@Override
public String toString() {
return "TimeColumnCondition(columnName=\"" + columnName + "\"," + op + ","
+ (op == ConditionOp.NotInSet || op == ConditionOp.InSet ? set : value) + ")";
}
示例10: toString
import org.datavec.api.transform.condition.ConditionOp; //导入方法依赖的package包/类
@Override
public String toString() {
return "LongColumnCondition(columnName=\"" + columnName + "\"," + op + ","
+ (op == ConditionOp.NotInSet || op == ConditionOp.InSet ? set : value) + ")";
}
示例11: toString
import org.datavec.api.transform.condition.ConditionOp; //导入方法依赖的package包/类
@Override
public String toString() {
return "CategoricalColumnCondition(columnName=\"" + columnName + "\"," + op + ","
+ (op == ConditionOp.NotInSet || op == ConditionOp.InSet ? set : value) + ")";
}
示例12: toString
import org.datavec.api.transform.condition.ConditionOp; //导入方法依赖的package包/类
@Override
public String toString() {
return "StringColumnCondition(columnName=\"" + columnName + "\"," + op + ","
+ (op == ConditionOp.NotInSet || op == ConditionOp.InSet ? set : value) + ")";
}
示例13: toString
import org.datavec.api.transform.condition.ConditionOp; //导入方法依赖的package包/类
@Override
public String toString() {
return "DoubleColumnCondition(columnName=\"" + columnName + "\"," + op + ","
+ (op == ConditionOp.NotInSet || op == ConditionOp.InSet ? set : value) + ")";
}
示例14: testConditions
import org.datavec.api.transform.condition.ConditionOp; //导入方法依赖的package包/类
@Test
public void testConditions() {
Set<String> setStr = new HashSet<>();
setStr.add("A");
setStr.add("B");
Set<Double> setD = new HashSet<>();
setD.add(1.0);
setD.add(2.0);
Set<Integer> setI = new HashSet<>();
setI.add(1);
setI.add(2);
Set<Long> setL = new HashSet<>();
setL.add(1L);
setL.add(2L);
Condition[] conditions = new Condition[] {new CategoricalColumnCondition("Col", ConditionOp.Equal, "A"),
new CategoricalColumnCondition("Col", ConditionOp.NotInSet, setStr),
new DoubleColumnCondition("Col", ConditionOp.Equal, 1.0),
new DoubleColumnCondition("Col", ConditionOp.InSet, setD),
new IntegerColumnCondition("Col", ConditionOp.Equal, 1),
new IntegerColumnCondition("Col", ConditionOp.InSet, setI),
new LongColumnCondition("Col", ConditionOp.Equal, 1),
new LongColumnCondition("Col", ConditionOp.InSet, setL),
new NullWritableColumnCondition("Col"),
new StringColumnCondition("Col", ConditionOp.NotEqual, "A"),
new StringColumnCondition("Col", ConditionOp.InSet, setStr),
new TimeColumnCondition("Col", ConditionOp.Equal, 1L),
new TimeColumnCondition("Col", ConditionOp.InSet, setL),
new StringRegexColumnCondition("Col", "Regex"),
BooleanCondition.OR(
BooleanCondition.AND(
new CategoricalColumnCondition("Col", ConditionOp.Equal, "A"),
new LongColumnCondition("Col2", ConditionOp.Equal, 1)),
BooleanCondition.NOT(new TimeColumnCondition("Col3", ConditionOp.Equal, 1L)))};
for (Condition c : conditions) {
String yaml = y.serialize(c);
String json = j.serialize(c);
// System.out.println(yaml);
// System.out.println(json);
// System.out.println();
Condition t2 = y.deserializeCondition(yaml);
Condition t3 = j.deserializeCondition(json);
assertEquals(c, t2);
assertEquals(c, t3);
}
String arrAsYaml = y.serialize(conditions);
String arrAsJson = j.serialize(conditions);
String listAsYaml = y.serializeConditionList(Arrays.asList(conditions));
String listAsJson = j.serializeConditionList(Arrays.asList(conditions));
// System.out.println("\n\n\n\n");
// System.out.println(listAsYaml);
List<Condition> lFromYaml = y.deserializeConditionList(listAsYaml);
List<Condition> lFromJson = j.deserializeConditionList(listAsJson);
assertEquals(Arrays.asList(conditions), y.deserializeConditionList(arrAsYaml));
assertEquals(Arrays.asList(conditions), j.deserializeConditionList(arrAsJson));
assertEquals(Arrays.asList(conditions), lFromYaml);
assertEquals(Arrays.asList(conditions), lFromJson);
}