01: /*
02: * This program is free software; you can redistribute it and/or modify
03: * it under the terms of the GNU General Public License as published by
04: * the Free Software Foundation; either version 2 of the License, or
05: * (at your option) any later version.
06: *
07: * This program is distributed in the hope that it will be useful,
08: * but WITHOUT ANY WARRANTY; without even the implied warranty of
09: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10: * GNU General Public License for more details.
11: *
12: * You should have received a copy of the GNU General Public License
13: * along with this program; if not, write to the Free Software
14: * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15: */
16:
17: /*
18: * IndividualInstance.java
19: * Copyright (C) 2003 Peter A. Flach, Nicolas Lachiche
20: *
21: * Thanks to Amelie Deltour for porting the original C code to Java
22: * and integrating it into Weka.
23: */
24:
25: package weka.associations.tertius;
26:
27: import weka.core.Instance;
28: import weka.core.Instances;
29:
30: /**
31: * @author Peter A. Flach
32: * @author Nicolas Lachiche
33: * @version $Revision: 1.4 $
34: */
35: public class IndividualInstance extends Instance {
36:
37: /** for serialization */
38: private static final long serialVersionUID = -7903938733476585114L;
39:
40: private Instances m_parts;
41:
42: public IndividualInstance(Instance individual, Instances parts) {
43:
44: super (individual);
45: m_parts = parts;
46: }
47:
48: public IndividualInstance(IndividualInstance instance) {
49:
50: super (instance);
51: m_parts = instance.m_parts;
52: }
53:
54: public Object copy() {
55:
56: IndividualInstance result = new IndividualInstance(this );
57: result.m_Dataset = m_Dataset;
58: return result;
59: }
60:
61: public Instances getParts() {
62:
63: return m_parts;
64: }
65:
66: }
|