jaga
Class SampleData

java.lang.Object
  |
  +--java.util.BitSet
        |
        +--jaga.BitSet
              |
              +--jaga.SampleData
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class SampleData
extends BitSet

This object stores sampled data. It stores the sampling rate and the data itself in an array of integers. The sample separation does not relate to an actual sampling frequency, but is a relative measure. For eg, we may wish the outputs of a circuit to be sampled ten times more often than the inputs are sent so the output SampleData would have a sampleSeparation of 1 and the input SampleData would have a sampleSeparation of 10.

See Also:
Serialized Form

Constructor Summary
SampleData(int sampleSeparation, int length)
          Creates new SampleData
SampleData(java.lang.String onesAndZeros, int sampleSeparation)
           
 
Method Summary
 BitSet getChunk(int start, int secLen)
          Takes two integers start,seclen and returns the BitSet of length seclen starting at position start of this bitset.
 int getSampleSeparation()
           
 java.lang.String toString()
          Will convert the BitSet to a string using the current codebase.
 
Methods inherited from class jaga.BitSet
bitsToInt, flip, getBooleanChunk, hashCode, length, setBits, setCodeBase, setLength, setTo
 
Methods inherited from class java.util.BitSet
and, andNot, clear, clone, equals, get, or, set, size, xor
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SampleData

public SampleData(int sampleSeparation,
                  int length)
Creates new SampleData

SampleData

public SampleData(java.lang.String onesAndZeros,
                  int sampleSeparation)
Method Detail

getSampleSeparation

public int getSampleSeparation()

getChunk

public BitSet getChunk(int start,
                       int secLen)
Description copied from class: BitSet
Takes two integers start,seclen and returns the BitSet of length seclen starting at position start of this bitset. NOT ROBUST, assumes start + seclen <= length
Overrides:
getChunk in class BitSet

toString

public java.lang.String toString()
Description copied from class: BitSet
Will convert the BitSet to a string using the current codebase.
Overrides:
toString in class BitSet