Package systole.domain.signals

Examples of systole.domain.signals.Segment.firstElement()


            diff = (segment.elementAt(j + h).subtract(segment.elementAt(j))).divide(new BigDecimal(2 * h),MathUtils.CONTEXT);
            derivated.add(diff);
        }

        diff = derivated.elementAt(1).subtract(derivated.firstElement());
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        return derivated;

    }

View Full Code Here


            diff = (segment.elementAt(j + h).subtract(segment.elementAt(j))).divide(new BigDecimal(2 * h),MathUtils.CONTEXT);
            derivated.add(diff);
        }

        diff = derivated.elementAt(1).subtract(derivated.firstElement());
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        return derivated;

    }

    public Segment getSecondDerivative(Segment segment) {
View Full Code Here

            //f''(x) = (f(x+2) - 2f(x+1) + f(x))/h^2 ; En este caso, h = 1
            diff = (segment.elementAt(j + 2).subtract(two.multiply(segment.elementAt(j + 1))).add(segment.elementAt(j).divide(h.pow(step),MathUtils.CONTEXT)));

            derivated.add(diff);
        }
        diff = derivated.elementAt(1).subtract(derivated.firstElement());
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        return derivated;

    }
View Full Code Here

            diff = (segment.elementAt(j + 2).subtract(two.multiply(segment.elementAt(j + 1))).add(segment.elementAt(j).divide(h.pow(step),MathUtils.CONTEXT)));

            derivated.add(diff);
        }
        diff = derivated.elementAt(1).subtract(derivated.firstElement());
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        return derivated;

    }

    public Segment getThirdDerivative(Segment segment) {
View Full Code Here

                    subtract(segment.elementAt(j))).divide(h.pow(step),MathUtils.CONTEXT);

            derivated.add(diff);
        }

        diff = derivated.elementAt(1).subtract(derivated.firstElement());
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        return derivated;
    }
View Full Code Here

            derivated.add(diff);
        }

        diff = derivated.elementAt(1).subtract(derivated.firstElement());
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        return derivated;
    }

    public Segment getFourthDerivative(Segment segment) {
View Full Code Here

            derivated.add(diff);
        }

        diff = derivated.elementAt(1).subtract(derivated.firstElement());
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        return derivated;
    }

    public Segment getFourthDerivative(Segment segment) {
        int nPoints = segment.size();
View Full Code Here

                    (segment.elementAt(j)))).divide(h.pow(step),MathUtils.CONTEXT);

            derivated.add(diff);
        }

         diff = derivated.elementAt(1).subtract(derivated.firstElement());
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        return derivated;
    }
View Full Code Here

            derivated.add(diff);
        }

         diff = derivated.elementAt(1).subtract(derivated.firstElement());
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        return derivated;
    }
}
View Full Code Here

            derivated.add(diff);
        }

         diff = derivated.elementAt(1).subtract(derivated.firstElement());
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        derivated.insertElementAt(derivated.firstElement().subtract(diff), 0);
        return derivated;
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.