org.dspace.statistics
Class Dataset

java.lang.Object
  extended by org.dspace.statistics.Dataset

public class Dataset
extends Object

Author:
kevinvandevelde at atmire.com Date: 21-jan-2009 Time: 13:44:48

Constructor Summary
Dataset(float[][] matrix)
           
Dataset(int rows, int cols)
           
 
Method Summary
 void addValueToMatrix(int row, int coll, float value)
           
 void addValueToMatrix(int row, int coll, String value)
           
 boolean containsNonZeroValues()
          Returns false if this dataset only contains zero's.
 ByteArrayOutputStream exportAsCSV()
           
 void flipRowCols()
           
 List<String> getColLabels()
           
 List<Map<String,String>> getColLabelsAttrs()
           
 String getColTitle()
           
 String getFormat()
           
 float[][] getMatrix()
           
 String[][] getMatrixFormatted()
           
 int getNbCols()
           
 int getNbRows()
           
 List<String> getRowLabels()
           
 List<Map<String,String>> getRowLabelsAttrs()
           
 String getRowTitle()
           
 void setColLabel(int n, String label)
           
 void setColLabelAttr(int pos, Map<String,String> attrMap)
           
 void setColLabelAttr(int pos, String attrName, String attr)
           
 void setColTitle(String colTitle)
           
 void setFormat(String format)
           
 void setRowLabel(int n, String label)
           
 void setRowLabelAttr(int pos, Map<String,String> attrMap)
           
 void setRowLabelAttr(int pos, String attrName, String attr)
           
 void setRowTitle(String rowTitle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dataset

public Dataset(int rows,
               int cols)

Dataset

public Dataset(float[][] matrix)
Method Detail

setColLabel

public void setColLabel(int n,
                        String label)

setRowLabel

public void setRowLabel(int n,
                        String label)

getRowTitle

public String getRowTitle()

getColTitle

public String getColTitle()

setColTitle

public void setColTitle(String colTitle)

setRowTitle

public void setRowTitle(String rowTitle)

setRowLabelAttr

public void setRowLabelAttr(int pos,
                            String attrName,
                            String attr)

setRowLabelAttr

public void setRowLabelAttr(int pos,
                            Map<String,String> attrMap)

setColLabelAttr

public void setColLabelAttr(int pos,
                            String attrName,
                            String attr)

setColLabelAttr

public void setColLabelAttr(int pos,
                            Map<String,String> attrMap)

getColLabelsAttrs

public List<Map<String,String>> getColLabelsAttrs()

getRowLabelsAttrs

public List<Map<String,String>> getRowLabelsAttrs()

getColLabels

public List<String> getColLabels()

getRowLabels

public List<String> getRowLabels()

getMatrix

public float[][] getMatrix()

getNbRows

public int getNbRows()

getNbCols

public int getNbCols()

getFormat

public String getFormat()

setFormat

public void setFormat(String format)

getMatrixFormatted

public String[][] getMatrixFormatted()

addValueToMatrix

public void addValueToMatrix(int row,
                             int coll,
                             float value)

addValueToMatrix

public void addValueToMatrix(int row,
                             int coll,
                             String value)
                      throws ParseException
Throws:
ParseException

containsNonZeroValues

public boolean containsNonZeroValues()
Returns false if this dataset only contains zero's.


flipRowCols

public void flipRowCols()

exportAsCSV

public ByteArrayOutputStream exportAsCSV()
                                  throws IOException
Throws:
IOException


Copyright © 2011 DuraSpace. All Rights Reserved.