Mercurial > hg > semantic-sia
changeset 49:4b74b959b576
removed the setVector method
author | stevenh |
---|---|
date | Tue, 02 Apr 2013 22:52:31 +0100 |
parents | ad9ef7637caa |
children | 34ccddf6c2ab |
files | src/org/qmul/eecs/c4dm/sia/model/VectorTableElement.java |
diffstat | 1 files changed, 0 insertions(+), 41 deletions(-) [+] |
line wrap: on
line diff
--- a/src/org/qmul/eecs/c4dm/sia/model/VectorTableElement.java Tue Apr 02 22:51:00 2013 +0100 +++ b/src/org/qmul/eecs/c4dm/sia/model/VectorTableElement.java Tue Apr 02 22:52:31 2013 +0100 @@ -1,7 +1,5 @@ package org.qmul.eecs.c4dm.sia.model; -import java.util.Vector; - import org.qmul.eecs.c4dm.sia.exceptions.DimensionException; import org.qmul.eecs.c4dm.sia.rdf.Namespaces; @@ -15,7 +13,6 @@ private Datapoint fromDatapoint; private Datapoint toDatapoint; - private NDimensionalObject vector; private Resource resource; public static final String RESOURCE_URI = Namespaces.SIA_NS_URI + "VectorTableElement"; @@ -47,7 +44,6 @@ */ public void setFromDatapoint(Datapoint fromDatapoint) throws DimensionException { this.fromDatapoint = fromDatapoint; - setVector(); } /** @@ -63,43 +59,6 @@ */ public void setToDatapoint(Datapoint toDatapoint) throws DimensionException { this.toDatapoint = toDatapoint; - setVector(); - } - - /** - * @throws DimensionException - */ - private void setVector() throws DimensionException { - NDimensionalObject vector = new NDimensionalObject(); - Vector<DimensionValue> dimVals = new Vector<DimensionValue>(); - - if (this.getFromDatapoint() != null && this.getToDatapoint() != null) - { - int fromDimValsSize = this.getFromDatapoint().getDimensionValues().size(); - int toDimValsSize = this.getToDatapoint().getDimensionValues().size(); - - if (fromDimValsSize != toDimValsSize) - throw new DimensionException("'from' and 'to' Datapoints have an unequal number of dimensions"); - - DimensionValue dimVal; - - for (int dim = 1; dim <= fromDimValsSize; dim++) - { - dimVal = new DimensionValue(); - double fromDimVal = this.getFromDatapoint().getDimensionValue(dim); - double toDimVal = this.getToDatapoint().getDimensionValue(dim); - dimVal.setDimension(dim); - dimVal.setValue(toDimVal - fromDimVal); - dimVals.add(dimVal); - } - vector.setDimensionValues(dimVals); - this.vector = vector; - } - } - - public NDimensionalObject getVector() { - - return this.vector; } /* (non-Javadoc)