10 package com.generalrobotix.ui.view.graph;
46 data_ =
new double[
size];
47 for (
int i = 0;
i <
size;
i++) {
48 data_[
i] = Double.NaN;
64 data_ =
new double[
size];
65 for (
int i = 0;
i <
size;
i++) {
66 data_[
i] = Double.NaN;
150 int len = data.length;
170 if (len > size_ - pos) {
177 int remain = former - pos;
181 data_, headPos_ + pos,
187 data_, headPos_ + pos,
217 setHead(size_ - 1 - pos, data);
239 xOffset_ += xStep_ * count;
240 if (count >= size_ || count <= -size_) {
242 data_[
i] = Double.NaN;
249 int newHead = prevHead + count;
251 for (
int i = prevHead;
i < newHead;
i++) {
252 data_[
i %
size_] = Double.NaN;
254 headPos_ = newHead %
size_;
257 for (
int i = newHead;
i < prevHead;
i++) {
262 data_[ind] = Double.NaN;
265 headPos_ = newHead %
size_;
284 headPos_ = (headPos_ + 1) % size_;
298 int setPos = (headPos_ + pos) % size_;
299 data_[setPos] =
value;
void setXOffset(double xOffset)
void setHead(int pos, double[] data)
void addLast(double value)
void setXStep(double xStep)
DataSeries(int size, double xOffset, double xStep)
void setTail(int pos, double[] data)