summaryrefslogtreecommitdiff
path: root/RTJava/benchmarks/RawSpeed/Fir/SampleQueue.java
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-07-01 16:18:56 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-07-01 16:18:56 +0000
commit6803d545979635f9fc0fb817b1e0841e69a96472 (patch)
tree74eb2aa0844bc54028da8dc9704fb6eac45322c0 /RTJava/benchmarks/RawSpeed/Fir/SampleQueue.java
parentc0cc5f64b0e435e8603e6a47161d166e4140a49d (diff)
downloadATCD-TAO-1_1_18.tar.gz
This commit was manufactured by cvs2svn to create tag 'TAO-1_1_18'.TAO-1_1_18
Diffstat (limited to 'RTJava/benchmarks/RawSpeed/Fir/SampleQueue.java')
-rw-r--r--RTJava/benchmarks/RawSpeed/Fir/SampleQueue.java59
1 files changed, 0 insertions, 59 deletions
diff --git a/RTJava/benchmarks/RawSpeed/Fir/SampleQueue.java b/RTJava/benchmarks/RawSpeed/Fir/SampleQueue.java
deleted file mode 100644
index bf090b437f3..00000000000
--- a/RTJava/benchmarks/RawSpeed/Fir/SampleQueue.java
+++ /dev/null
@@ -1,59 +0,0 @@
-//$Id$
-
-package Fir;
-
-/**
- * This class intented to contain a set of sample from
- * a given continuous variable. The sample are managed
- * as if the n-th item rapresent the item n sample in
- * the past. Each time an item is added the oldest sample
- * is discarded (i.e. the sample that is as old as the size
- * of the queue plus one).
- *
- */
-public class SampleQueue {
-
- /**
- * Create a SampleQueue with a given size.
- *
- * @param sampleNum: The number of sample that the queue can store.
- */
- public SampleQueue(int sampleNum) {
-
- this.mSampleNum = sampleNum;
- this.mSample = new double[this.mSampleNum];
- this.mTail = 0;
- this.mCachedOffset = 0;
- }
- /**
- * Adds an item to the sample queue. The last
- * item added is treated as the most recent in time.
- *
- * @param item: The item to be added to the queue.
- */
- public void AddItem(double item) {
-
- this.mCachedOffset = this.mTail+this.mSampleNum;
- this.mSample[this.mTail] = item;
- this.mTail = (this.mTail+1)%this.mSampleNum;
- }
-
- /**
- * Adds an item to the sample queue. The last
- * item added is treated as the most recent in time.
- *
- * @param item: The item to be added to the queue.
- */
- public double GetItem(int index) {
- return this.mSample[index];
- }
-
- private int mSampleNum;
-
- private int mTail;
-
- private int mCachedOffset;
-
- private double mSample[];
-
-}