source: src/main/java/weka/associations/tertius/IndividualInstance.java @ 5

Last change on this file since 5 was 4, checked in by gnappo, 14 years ago

Import di weka.

File size: 1.9 KB
Line 
1/*
2 *    This program is free software; you can redistribute it and/or modify
3 *    it under the terms of the GNU General Public License as published by
4 *    the Free Software Foundation; either version 2 of the License, or
5 *    (at your option) any later version.
6 *
7 *    This program is distributed in the hope that it will be useful,
8 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
9 *    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
25package weka.associations.tertius;
26
27import weka.core.Instance;
28import weka.core.DenseInstance;
29import weka.core.Instances;
30import weka.core.RevisionUtils;
31
32/**
33 * @author Peter A. Flach
34 * @author Nicolas Lachiche
35 * @version $Revision: 5987 $
36 */
37public class IndividualInstance
38  extends DenseInstance {
39
40  /** for serialization */
41  private static final long serialVersionUID = -7903938733476585114L;
42 
43  private Instances m_parts;
44
45  public IndividualInstance(Instance individual, Instances parts) {
46
47    super(individual);
48    m_parts = parts;
49  }
50
51  public IndividualInstance(IndividualInstance instance) {
52
53    super(instance);
54    m_parts = instance.m_parts;
55  }
56
57  public Object copy() {
58
59    IndividualInstance result = new IndividualInstance(this);
60    result.m_Dataset = m_Dataset;
61    return result;
62  }
63
64  public Instances getParts() {
65       
66    return m_parts;
67  }
68 
69  /**
70   * Returns the revision string.
71   *
72   * @return            the revision
73   */
74  public String getRevision() {
75    return RevisionUtils.extract("$Revision: 5987 $");
76  }
77}
Note: See TracBrowser for help on using the repository browser.