📄 literal.java
字号:
/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *//* * Literal.java * Copyright (C) 2003 Peter A. Flach, Nicolas Lachiche * * Thanks to Amelie Deltour for porting the original C code to Java * and integrating it into Weka. * */package weka.associations.tertius;import java.io.Serializable;import weka.core.Instance;/** * @author Peter A. Flach * @author Nicolas Lachiche * @version $Revision: 1.3 $ */public abstract class Literal implements Serializable { private Predicate m_predicate; public static final int NEG = 0; public static final int POS = 1; private int m_sign; private Literal m_negation; protected int m_missing; public Literal(Predicate predicate, int sign, int missing) { m_predicate = predicate; m_sign = sign; m_negation = null; m_missing = missing; } public Predicate getPredicate() { return m_predicate; } public Literal getNegation() { return m_negation; } public void setNegation(Literal negation) { m_negation = negation; } public boolean positive() { return m_sign == POS; } public boolean negative() { return m_sign == NEG; } public abstract boolean satisfies(Instance instance); public abstract boolean negationSatisfies(Instance instance); public abstract String toString();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -