| 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 | * Copyright (C) 2004 |
|---|
| 19 | * & Matthias Schubert (schubert@dbs.ifi.lmu.de) |
|---|
| 20 | * & Zhanna Melnikova-Albrecht (melnikov@cip.ifi.lmu.de) |
|---|
| 21 | * & Rainer Holzmann (holzmann@cip.ifi.lmu.de) |
|---|
| 22 | */ |
|---|
| 23 | |
|---|
| 24 | package weka.clusterers.forOPTICSAndDBScan.OPTICS_GUI; |
|---|
| 25 | |
|---|
| 26 | import weka.core.FastVector; |
|---|
| 27 | import weka.core.RevisionHandler; |
|---|
| 28 | import weka.core.RevisionUtils; |
|---|
| 29 | |
|---|
| 30 | import java.io.Serializable; |
|---|
| 31 | |
|---|
| 32 | /** |
|---|
| 33 | * <p> |
|---|
| 34 | * SERObject.java <br/> |
|---|
| 35 | * Authors: Rainer Holzmann, Zhanna Melnikova-Albrecht <br/> |
|---|
| 36 | * Date: Sep 15, 2004 <br/> |
|---|
| 37 | * Time: 9:43:00 PM <br/> |
|---|
| 38 | * $ Revision 1.4 $ <br/> |
|---|
| 39 | * </p> |
|---|
| 40 | * |
|---|
| 41 | * @author Zhanna Melnikova-Albrecht (melnikov@cip.ifi.lmu.de) |
|---|
| 42 | * @author Rainer Holzmann (holzmann@cip.ifi.lmu.de) |
|---|
| 43 | * @version $Revision: 1.4 $ |
|---|
| 44 | */ |
|---|
| 45 | public class SERObject |
|---|
| 46 | implements Serializable, RevisionHandler { |
|---|
| 47 | |
|---|
| 48 | /** for serialization */ |
|---|
| 49 | private static final long serialVersionUID = -6022057864970639151L; |
|---|
| 50 | |
|---|
| 51 | private FastVector resultVector; |
|---|
| 52 | private int databaseSize; |
|---|
| 53 | private int numberOfAttributes; |
|---|
| 54 | private double epsilon; |
|---|
| 55 | private int minPoints; |
|---|
| 56 | private boolean opticsOutputs; |
|---|
| 57 | private String database_Type; |
|---|
| 58 | private String database_distanceType; |
|---|
| 59 | private int numberOfGeneratedClusters; |
|---|
| 60 | private String elapsedTime; |
|---|
| 61 | |
|---|
| 62 | // ***************************************************************************************************************** |
|---|
| 63 | // constructors |
|---|
| 64 | // ***************************************************************************************************************** |
|---|
| 65 | |
|---|
| 66 | public SERObject(FastVector resultVector, |
|---|
| 67 | int databaseSize, |
|---|
| 68 | int numberOfAttributes, |
|---|
| 69 | double epsilon, |
|---|
| 70 | int minPoints, |
|---|
| 71 | boolean opticsOutputs, |
|---|
| 72 | String database_Type, |
|---|
| 73 | String database_distanceType, |
|---|
| 74 | int numberOfGeneratedClusters, |
|---|
| 75 | String elapsedTime) { |
|---|
| 76 | this.resultVector = resultVector; |
|---|
| 77 | this.databaseSize = databaseSize; |
|---|
| 78 | this.numberOfAttributes = numberOfAttributes; |
|---|
| 79 | this.epsilon = epsilon; |
|---|
| 80 | this.minPoints = minPoints; |
|---|
| 81 | this.opticsOutputs = opticsOutputs; |
|---|
| 82 | this.database_Type = database_Type; |
|---|
| 83 | this.database_distanceType = database_distanceType; |
|---|
| 84 | this.numberOfGeneratedClusters = numberOfGeneratedClusters; |
|---|
| 85 | this.elapsedTime = elapsedTime; |
|---|
| 86 | } |
|---|
| 87 | |
|---|
| 88 | // ***************************************************************************************************************** |
|---|
| 89 | // methods |
|---|
| 90 | // ***************************************************************************************************************** |
|---|
| 91 | |
|---|
| 92 | /** |
|---|
| 93 | * Returns the resultVector |
|---|
| 94 | * @return FastVector resultVector |
|---|
| 95 | */ |
|---|
| 96 | public FastVector getResultVector() { |
|---|
| 97 | return resultVector; |
|---|
| 98 | } |
|---|
| 99 | |
|---|
| 100 | /** |
|---|
| 101 | * Returns the database's size |
|---|
| 102 | * @return int databaseSize |
|---|
| 103 | */ |
|---|
| 104 | public int getDatabaseSize() { |
|---|
| 105 | return databaseSize; |
|---|
| 106 | } |
|---|
| 107 | |
|---|
| 108 | /** |
|---|
| 109 | * Returns the number of Attributes of the specified database |
|---|
| 110 | * @return int numberOfAttributes |
|---|
| 111 | */ |
|---|
| 112 | public int getNumberOfAttributes() { |
|---|
| 113 | return numberOfAttributes; |
|---|
| 114 | } |
|---|
| 115 | |
|---|
| 116 | /** |
|---|
| 117 | * Returns the value of epsilon |
|---|
| 118 | * @return double epsilon |
|---|
| 119 | */ |
|---|
| 120 | public double getEpsilon() { |
|---|
| 121 | return epsilon; |
|---|
| 122 | } |
|---|
| 123 | |
|---|
| 124 | /** |
|---|
| 125 | * Returns the number of minPoints |
|---|
| 126 | * @return int minPoints |
|---|
| 127 | */ |
|---|
| 128 | public int getMinPoints() { |
|---|
| 129 | return minPoints; |
|---|
| 130 | } |
|---|
| 131 | |
|---|
| 132 | /** |
|---|
| 133 | * Returns the flag for writing actions |
|---|
| 134 | * @return True if the outputs are to write to a file, else false |
|---|
| 135 | */ |
|---|
| 136 | public boolean isOpticsOutputs() { |
|---|
| 137 | return opticsOutputs; |
|---|
| 138 | } |
|---|
| 139 | |
|---|
| 140 | /** |
|---|
| 141 | * Returns the type of the used index (database) |
|---|
| 142 | * @return String Index-type |
|---|
| 143 | */ |
|---|
| 144 | public String getDatabase_Type() { |
|---|
| 145 | return database_Type; |
|---|
| 146 | } |
|---|
| 147 | |
|---|
| 148 | /** |
|---|
| 149 | * Returns the distance-type |
|---|
| 150 | * @return String Distance-type |
|---|
| 151 | */ |
|---|
| 152 | public String getDatabase_distanceType() { |
|---|
| 153 | return database_distanceType; |
|---|
| 154 | } |
|---|
| 155 | |
|---|
| 156 | /** |
|---|
| 157 | * Returns the number of generated clusters |
|---|
| 158 | * @return int numberOfGeneratedClusters |
|---|
| 159 | */ |
|---|
| 160 | public int getNumberOfGeneratedClusters() { |
|---|
| 161 | return numberOfGeneratedClusters; |
|---|
| 162 | } |
|---|
| 163 | |
|---|
| 164 | /** |
|---|
| 165 | * Returns the elapsed-time |
|---|
| 166 | * @return String elapsedTime |
|---|
| 167 | */ |
|---|
| 168 | public String getElapsedTime() { |
|---|
| 169 | return elapsedTime + " sec"; |
|---|
| 170 | } |
|---|
| 171 | |
|---|
| 172 | /** |
|---|
| 173 | * Returns the revision string. |
|---|
| 174 | * |
|---|
| 175 | * @return the revision |
|---|
| 176 | */ |
|---|
| 177 | public String getRevision() { |
|---|
| 178 | return RevisionUtils.extract("$Revision: 1.4 $"); |
|---|
| 179 | } |
|---|
| 180 | } |
|---|