diff --git a/src/com/stuypulse/stuylib/control/Controller.java b/src/com/stuypulse/stuylib/control/Controller.java index b54ec934..811ddd4a 100644 --- a/src/com/stuypulse/stuylib/control/Controller.java +++ b/src/com/stuypulse/stuylib/control/Controller.java @@ -4,7 +4,7 @@ package com.stuypulse.stuylib.control; -import com.stuypulse.stuylib.streams.filters.IFilter; +import com.stuypulse.stuylib.streams.numbers.filters.IFilter; /** * A controller calculates an output variable given a setpoint and measurement of a single variable. diff --git a/src/com/stuypulse/stuylib/control/angle/AngleController.java b/src/com/stuypulse/stuylib/control/angle/AngleController.java index 0abd1bea..ccc51b30 100644 --- a/src/com/stuypulse/stuylib/control/angle/AngleController.java +++ b/src/com/stuypulse/stuylib/control/angle/AngleController.java @@ -6,7 +6,7 @@ import com.stuypulse.stuylib.math.Angle; import com.stuypulse.stuylib.streams.angles.filters.AFilter; -import com.stuypulse.stuylib.streams.filters.IFilter; +import com.stuypulse.stuylib.streams.numbers.filters.IFilter; /** * Base class of controller classes of continuous systems. This means that both the setpoint and diff --git a/src/com/stuypulse/stuylib/control/angle/feedback/AnglePIDCalculator.java b/src/com/stuypulse/stuylib/control/angle/feedback/AnglePIDCalculator.java index 87250624..4ae4005a 100644 --- a/src/com/stuypulse/stuylib/control/angle/feedback/AnglePIDCalculator.java +++ b/src/com/stuypulse/stuylib/control/angle/feedback/AnglePIDCalculator.java @@ -8,9 +8,9 @@ import com.stuypulse.stuylib.math.Angle; import com.stuypulse.stuylib.math.SLMath; import com.stuypulse.stuylib.network.SmartNumber; -import com.stuypulse.stuylib.streams.filters.IFilter; -import com.stuypulse.stuylib.streams.filters.IFilterGroup; -import com.stuypulse.stuylib.streams.filters.TimedMovingAverage; +import com.stuypulse.stuylib.streams.numbers.filters.IFilter; +import com.stuypulse.stuylib.streams.numbers.filters.IFilterGroup; +import com.stuypulse.stuylib.streams.numbers.filters.TimedMovingAverage; import com.stuypulse.stuylib.util.StopWatch; /** diff --git a/src/com/stuypulse/stuylib/control/angle/feedback/AnglePIDController.java b/src/com/stuypulse/stuylib/control/angle/feedback/AnglePIDController.java index 41c78bf5..8dce7bbb 100644 --- a/src/com/stuypulse/stuylib/control/angle/feedback/AnglePIDController.java +++ b/src/com/stuypulse/stuylib/control/angle/feedback/AnglePIDController.java @@ -8,8 +8,8 @@ import com.stuypulse.stuylib.math.Angle; import com.stuypulse.stuylib.math.SLMath; import com.stuypulse.stuylib.network.SmartNumber; -import com.stuypulse.stuylib.streams.filters.IFilter; -import com.stuypulse.stuylib.streams.filters.IFilterGroup; +import com.stuypulse.stuylib.streams.numbers.filters.IFilter; +import com.stuypulse.stuylib.streams.numbers.filters.IFilterGroup; import com.stuypulse.stuylib.util.StopWatch; /** diff --git a/src/com/stuypulse/stuylib/control/feedback/PIDCalculator.java b/src/com/stuypulse/stuylib/control/feedback/PIDCalculator.java index 6130c3eb..423536f0 100644 --- a/src/com/stuypulse/stuylib/control/feedback/PIDCalculator.java +++ b/src/com/stuypulse/stuylib/control/feedback/PIDCalculator.java @@ -7,9 +7,9 @@ import com.stuypulse.stuylib.control.Controller; import com.stuypulse.stuylib.math.SLMath; import com.stuypulse.stuylib.network.SmartNumber; -import com.stuypulse.stuylib.streams.filters.IFilter; -import com.stuypulse.stuylib.streams.filters.IFilterGroup; -import com.stuypulse.stuylib.streams.filters.TimedMovingAverage; +import com.stuypulse.stuylib.streams.numbers.filters.IFilter; +import com.stuypulse.stuylib.streams.numbers.filters.IFilterGroup; +import com.stuypulse.stuylib.streams.numbers.filters.TimedMovingAverage; import com.stuypulse.stuylib.util.StopWatch; /** diff --git a/src/com/stuypulse/stuylib/control/feedback/PIDController.java b/src/com/stuypulse/stuylib/control/feedback/PIDController.java index f001a332..058f1b70 100644 --- a/src/com/stuypulse/stuylib/control/feedback/PIDController.java +++ b/src/com/stuypulse/stuylib/control/feedback/PIDController.java @@ -7,8 +7,8 @@ import com.stuypulse.stuylib.control.Controller; import com.stuypulse.stuylib.math.SLMath; import com.stuypulse.stuylib.network.SmartNumber; -import com.stuypulse.stuylib.streams.filters.IFilter; -import com.stuypulse.stuylib.streams.filters.IFilterGroup; +import com.stuypulse.stuylib.streams.numbers.filters.IFilter; +import com.stuypulse.stuylib.streams.numbers.filters.IFilterGroup; import com.stuypulse.stuylib.util.StopWatch; /** diff --git a/src/com/stuypulse/stuylib/control/feedforward/ArmFeedforward.java b/src/com/stuypulse/stuylib/control/feedforward/ArmFeedforward.java index 9a2daf85..c9638ad7 100644 --- a/src/com/stuypulse/stuylib/control/feedforward/ArmFeedforward.java +++ b/src/com/stuypulse/stuylib/control/feedforward/ArmFeedforward.java @@ -5,7 +5,7 @@ package com.stuypulse.stuylib.control.feedforward; import com.stuypulse.stuylib.control.Controller; -import com.stuypulse.stuylib.streams.filters.IFilter; +import com.stuypulse.stuylib.streams.numbers.filters.IFilter; /** * A feedforward term to account for gravity for motorized arms. diff --git a/src/com/stuypulse/stuylib/control/feedforward/MotorFeedforward.java b/src/com/stuypulse/stuylib/control/feedforward/MotorFeedforward.java index 8ba44d15..a466d0f1 100644 --- a/src/com/stuypulse/stuylib/control/feedforward/MotorFeedforward.java +++ b/src/com/stuypulse/stuylib/control/feedforward/MotorFeedforward.java @@ -7,7 +7,7 @@ import com.stuypulse.stuylib.control.Controller; import com.stuypulse.stuylib.control.angle.AngleController; import com.stuypulse.stuylib.control.angle.feedforward.AnglePositionFeedforwardController; -import com.stuypulse.stuylib.streams.filters.Derivative; +import com.stuypulse.stuylib.streams.numbers.filters.Derivative; /** * A motor feedforward model, which can be used to calculate an output voltage given a desired diff --git a/src/com/stuypulse/stuylib/control/feedforward/PositionFeedforwardController.java b/src/com/stuypulse/stuylib/control/feedforward/PositionFeedforwardController.java index da240005..51f1987a 100644 --- a/src/com/stuypulse/stuylib/control/feedforward/PositionFeedforwardController.java +++ b/src/com/stuypulse/stuylib/control/feedforward/PositionFeedforwardController.java @@ -5,7 +5,7 @@ package com.stuypulse.stuylib.control.feedforward; import com.stuypulse.stuylib.control.Controller; -import com.stuypulse.stuylib.streams.filters.Derivative; +import com.stuypulse.stuylib.streams.numbers.filters.Derivative; /** * A positional controller that uses a feedforward model to calculate motor outputs given positional diff --git a/src/com/stuypulse/stuylib/input/gamepads/keyboard/KeyGamepad.java b/src/com/stuypulse/stuylib/input/gamepads/keyboard/KeyGamepad.java index cb89fa82..cfc55e09 100644 --- a/src/com/stuypulse/stuylib/input/gamepads/keyboard/KeyGamepad.java +++ b/src/com/stuypulse/stuylib/input/gamepads/keyboard/KeyGamepad.java @@ -19,7 +19,7 @@ * *
* - * @see com.stuypulse.stuylib.streams.filters.IFilter + * @see com.stuypulse.stuylib.streams.numbers.filters.IFilter * @author Myles Pasetsky (selym3) */ public class KeyGamepad extends Gamepad { diff --git a/src/com/stuypulse/stuylib/math/interpolation/Interpolator.java b/src/com/stuypulse/stuylib/math/interpolation/Interpolator.java index f33ba7e5..16e39405 100644 --- a/src/com/stuypulse/stuylib/math/interpolation/Interpolator.java +++ b/src/com/stuypulse/stuylib/math/interpolation/Interpolator.java @@ -5,7 +5,7 @@ package com.stuypulse.stuylib.math.interpolation; import com.stuypulse.stuylib.math.Vector2D; -import com.stuypulse.stuylib.streams.filters.IFilter; +import com.stuypulse.stuylib.streams.numbers.filters.IFilter; import java.util.Arrays; diff --git a/src/com/stuypulse/stuylib/network/SmartNumber.java b/src/com/stuypulse/stuylib/network/SmartNumber.java index cd1acda1..ebfaab92 100644 --- a/src/com/stuypulse/stuylib/network/SmartNumber.java +++ b/src/com/stuypulse/stuylib/network/SmartNumber.java @@ -4,7 +4,7 @@ package com.stuypulse.stuylib.network; -import com.stuypulse.stuylib.streams.IStream; +import com.stuypulse.stuylib.streams.numbers.IStream; import edu.wpi.first.networktables.NetworkTablesJNI; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; diff --git a/src/com/stuypulse/stuylib/streams/IFuser.java b/src/com/stuypulse/stuylib/streams/IFuser.java deleted file mode 100644 index b6c71c87..00000000 --- a/src/com/stuypulse/stuylib/streams/IFuser.java +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2023 StuyPulse Robotics. All rights reserved. */ -/* This work is licensed under the terms of the MIT license */ -/* found in the root directory of this project. */ - -package com.stuypulse.stuylib.streams; - -import com.stuypulse.stuylib.streams.filters.HighPassFilter; -import com.stuypulse.stuylib.streams.filters.IFilter; -import com.stuypulse.stuylib.streams.filters.LowPassFilter; - -/** - * A class that combines two IStreams, usually in order to combine some slow data source with a - * faster one. The Base Measurement should generally drift less while the Fast Measurement should - * have less delay. The Fast measurement will go through a high pass filter so it is less important - * if that one drifts compared to the Base Measurement. - * - *

Example Usage: BaseMeasurement = Limelight, FastMeasurement = Encoders - * - * @author Myles Pasetsky - */ -public class IFuser implements IStream { - - private final Number mFilterRC; - - private final IStream mBase; - private final IStream mFast; - - private IFilter mBaseFilter; - private IFilter mFastFilter; - - private double mFastOffset; - - /** - * Create an IFuser with an RC, Base/Fast Measurement stream - * - * @param rc RC value for the lowpass / highpass filters - * @param baseMeasurement a stream that returns the slow, but accurate measurement values - * @param fastMeasurement a stream that returns faster, less accurate measurement values - */ - public IFuser(Number rc, IStream baseMeasurement, IStream fastMeasurement) { - mBase = baseMeasurement; - mFast = fastMeasurement; - - mFilterRC = rc; - - reset(); - } - - /** Resets the IFuser so that it can ignore any previous data / reset its initial read */ - public void reset() { - mBaseFilter = new LowPassFilter(mFilterRC); - mFastFilter = new HighPassFilter(mFilterRC); - - mFastOffset = mBase.get() - mFast.get(); - } - - private double getBase() { - return mBaseFilter.get(mBase.get()); - } - - private double getFast() { - return mFastFilter.get(mFast.get() + mFastOffset); - } - - /** Get the result of merging the two datastreams together */ - public double get() { - return getBase() + getFast(); - } -} diff --git a/src/com/stuypulse/stuylib/streams/angles/AStream.java b/src/com/stuypulse/stuylib/streams/angles/AStream.java index de323e40..f820dc58 100644 --- a/src/com/stuypulse/stuylib/streams/angles/AStream.java +++ b/src/com/stuypulse/stuylib/streams/angles/AStream.java @@ -5,8 +5,8 @@ package com.stuypulse.stuylib.streams.angles; import com.stuypulse.stuylib.math.Angle; -import com.stuypulse.stuylib.streams.IStream; import com.stuypulse.stuylib.streams.angles.filters.AFilter; +import com.stuypulse.stuylib.streams.numbers.IStream; import com.stuypulse.stuylib.streams.vectors.VStream; import java.util.function.Supplier; diff --git a/src/com/stuypulse/stuylib/streams/booleans/filters/BButtonRC.java b/src/com/stuypulse/stuylib/streams/booleans/filters/BButtonRC.java index ffd68d22..1bc57563 100644 --- a/src/com/stuypulse/stuylib/streams/booleans/filters/BButtonRC.java +++ b/src/com/stuypulse/stuylib/streams/booleans/filters/BButtonRC.java @@ -4,7 +4,7 @@ package com.stuypulse.stuylib.streams.booleans.filters; -import com.stuypulse.stuylib.streams.filters.HighPassFilter; +import com.stuypulse.stuylib.streams.numbers.filters.HighPassFilter; /** * A simple boolean filter that returns true when a boolean stream changes depending on the type. diff --git a/src/com/stuypulse/stuylib/streams/booleans/filters/BDebounceRC.java b/src/com/stuypulse/stuylib/streams/booleans/filters/BDebounceRC.java index 639ae35e..2ea02498 100644 --- a/src/com/stuypulse/stuylib/streams/booleans/filters/BDebounceRC.java +++ b/src/com/stuypulse/stuylib/streams/booleans/filters/BDebounceRC.java @@ -4,7 +4,7 @@ package com.stuypulse.stuylib.streams.booleans.filters; -import com.stuypulse.stuylib.streams.filters.LowPassFilter; +import com.stuypulse.stuylib.streams.numbers.filters.LowPassFilter; /** * An RC Debounce class takes the average of the past few boolean values to remove noise. diff --git a/src/com/stuypulse/stuylib/streams/FilteredIStream.java b/src/com/stuypulse/stuylib/streams/numbers/FilteredIStream.java similarity index 90% rename from src/com/stuypulse/stuylib/streams/FilteredIStream.java rename to src/com/stuypulse/stuylib/streams/numbers/FilteredIStream.java index d1b664d9..23569cc7 100644 --- a/src/com/stuypulse/stuylib/streams/FilteredIStream.java +++ b/src/com/stuypulse/stuylib/streams/numbers/FilteredIStream.java @@ -2,9 +2,9 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams; +package com.stuypulse.stuylib.streams.numbers; -import com.stuypulse.stuylib.streams.filters.IFilter; +import com.stuypulse.stuylib.streams.numbers.filters.IFilter; /** * Takes an {@link IStream} and a {@link IFilter} and makes a {@link FilteredIStream} diff --git a/src/com/stuypulse/stuylib/streams/IStream.java b/src/com/stuypulse/stuylib/streams/numbers/IStream.java similarity index 96% rename from src/com/stuypulse/stuylib/streams/IStream.java rename to src/com/stuypulse/stuylib/streams/numbers/IStream.java index 3ac7b428..68056f2f 100644 --- a/src/com/stuypulse/stuylib/streams/IStream.java +++ b/src/com/stuypulse/stuylib/streams/numbers/IStream.java @@ -2,11 +2,11 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams; +package com.stuypulse.stuylib.streams.numbers; import com.stuypulse.stuylib.streams.angles.AStream; import com.stuypulse.stuylib.streams.booleans.BStream; -import com.stuypulse.stuylib.streams.filters.IFilter; +import com.stuypulse.stuylib.streams.numbers.filters.IFilter; import java.util.function.DoubleSupplier; diff --git a/src/com/stuypulse/stuylib/streams/NumberStream.java b/src/com/stuypulse/stuylib/streams/numbers/NumberStream.java similarity index 96% rename from src/com/stuypulse/stuylib/streams/NumberStream.java rename to src/com/stuypulse/stuylib/streams/numbers/NumberStream.java index 258f5ebe..6344cdf0 100644 --- a/src/com/stuypulse/stuylib/streams/NumberStream.java +++ b/src/com/stuypulse/stuylib/streams/numbers/NumberStream.java @@ -2,7 +2,7 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams; +package com.stuypulse.stuylib.streams.numbers; /** * A number which reads from a streams. diff --git a/src/com/stuypulse/stuylib/streams/PollingIStream.java b/src/com/stuypulse/stuylib/streams/numbers/PollingIStream.java similarity index 96% rename from src/com/stuypulse/stuylib/streams/PollingIStream.java rename to src/com/stuypulse/stuylib/streams/numbers/PollingIStream.java index 56e42512..d895b2a4 100644 --- a/src/com/stuypulse/stuylib/streams/PollingIStream.java +++ b/src/com/stuypulse/stuylib/streams/numbers/PollingIStream.java @@ -2,7 +2,7 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams; +package com.stuypulse.stuylib.streams.numbers; import edu.wpi.first.wpilibj.Notifier; diff --git a/src/com/stuypulse/stuylib/streams/filters/Derivative.java b/src/com/stuypulse/stuylib/streams/numbers/filters/Derivative.java similarity index 92% rename from src/com/stuypulse/stuylib/streams/filters/Derivative.java rename to src/com/stuypulse/stuylib/streams/numbers/filters/Derivative.java index 83e0ec28..5805e23b 100644 --- a/src/com/stuypulse/stuylib/streams/filters/Derivative.java +++ b/src/com/stuypulse/stuylib/streams/numbers/filters/Derivative.java @@ -2,7 +2,7 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams.filters; +package com.stuypulse.stuylib.streams.numbers.filters; import com.stuypulse.stuylib.util.StopWatch; diff --git a/src/com/stuypulse/stuylib/streams/filters/HighPassFilter.java b/src/com/stuypulse/stuylib/streams/numbers/filters/HighPassFilter.java similarity index 91% rename from src/com/stuypulse/stuylib/streams/filters/HighPassFilter.java rename to src/com/stuypulse/stuylib/streams/numbers/filters/HighPassFilter.java index bf1851a0..a605ae7f 100644 --- a/src/com/stuypulse/stuylib/streams/filters/HighPassFilter.java +++ b/src/com/stuypulse/stuylib/streams/numbers/filters/HighPassFilter.java @@ -2,7 +2,7 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams.filters; +package com.stuypulse.stuylib.streams.numbers.filters; /** * Implementation for of a real time IIR HighPassFilter diff --git a/src/com/stuypulse/stuylib/streams/filters/IFilter.java b/src/com/stuypulse/stuylib/streams/numbers/filters/IFilter.java similarity index 98% rename from src/com/stuypulse/stuylib/streams/filters/IFilter.java rename to src/com/stuypulse/stuylib/streams/numbers/filters/IFilter.java index 974c0fbd..ceefc40e 100644 --- a/src/com/stuypulse/stuylib/streams/filters/IFilter.java +++ b/src/com/stuypulse/stuylib/streams/numbers/filters/IFilter.java @@ -2,7 +2,7 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams.filters; +package com.stuypulse.stuylib.streams.numbers.filters; /** * This is the Filter interface class that gives a definition for how to implement a filter. diff --git a/src/com/stuypulse/stuylib/streams/filters/IFilterGroup.java b/src/com/stuypulse/stuylib/streams/numbers/filters/IFilterGroup.java similarity index 94% rename from src/com/stuypulse/stuylib/streams/filters/IFilterGroup.java rename to src/com/stuypulse/stuylib/streams/numbers/filters/IFilterGroup.java index 9aa6dae6..964016bc 100644 --- a/src/com/stuypulse/stuylib/streams/filters/IFilterGroup.java +++ b/src/com/stuypulse/stuylib/streams/numbers/filters/IFilterGroup.java @@ -2,7 +2,7 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams.filters; +package com.stuypulse.stuylib.streams.numbers.filters; /** * A class that lets you combine multiple stream filters into one stream filter diff --git a/src/com/stuypulse/stuylib/streams/filters/Integral.java b/src/com/stuypulse/stuylib/streams/numbers/filters/Integral.java similarity index 92% rename from src/com/stuypulse/stuylib/streams/filters/Integral.java rename to src/com/stuypulse/stuylib/streams/numbers/filters/Integral.java index 681113c3..499c5c12 100644 --- a/src/com/stuypulse/stuylib/streams/filters/Integral.java +++ b/src/com/stuypulse/stuylib/streams/numbers/filters/Integral.java @@ -2,7 +2,7 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams.filters; +package com.stuypulse.stuylib.streams.numbers.filters; import com.stuypulse.stuylib.util.StopWatch; diff --git a/src/com/stuypulse/stuylib/streams/filters/LowPassFilter.java b/src/com/stuypulse/stuylib/streams/numbers/filters/LowPassFilter.java similarity index 96% rename from src/com/stuypulse/stuylib/streams/filters/LowPassFilter.java rename to src/com/stuypulse/stuylib/streams/numbers/filters/LowPassFilter.java index b56c7ccc..e5b67442 100644 --- a/src/com/stuypulse/stuylib/streams/filters/LowPassFilter.java +++ b/src/com/stuypulse/stuylib/streams/numbers/filters/LowPassFilter.java @@ -2,7 +2,7 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams.filters; +package com.stuypulse.stuylib.streams.numbers.filters; import com.stuypulse.stuylib.math.SLMath; import com.stuypulse.stuylib.util.StopWatch; diff --git a/src/com/stuypulse/stuylib/streams/filters/MedianFilter.java b/src/com/stuypulse/stuylib/streams/numbers/filters/MedianFilter.java similarity index 97% rename from src/com/stuypulse/stuylib/streams/filters/MedianFilter.java rename to src/com/stuypulse/stuylib/streams/numbers/filters/MedianFilter.java index b17f7a89..15727d86 100644 --- a/src/com/stuypulse/stuylib/streams/filters/MedianFilter.java +++ b/src/com/stuypulse/stuylib/streams/numbers/filters/MedianFilter.java @@ -2,7 +2,7 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams.filters; +package com.stuypulse.stuylib.streams.numbers.filters; import java.util.ArrayList; import java.util.Collections; diff --git a/src/com/stuypulse/stuylib/streams/filters/MotionProfile.java b/src/com/stuypulse/stuylib/streams/numbers/filters/MotionProfile.java similarity index 98% rename from src/com/stuypulse/stuylib/streams/filters/MotionProfile.java rename to src/com/stuypulse/stuylib/streams/numbers/filters/MotionProfile.java index e117c8fd..8be023d4 100644 --- a/src/com/stuypulse/stuylib/streams/filters/MotionProfile.java +++ b/src/com/stuypulse/stuylib/streams/numbers/filters/MotionProfile.java @@ -2,7 +2,7 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams.filters; +package com.stuypulse.stuylib.streams.numbers.filters; import com.stuypulse.stuylib.math.SLMath; import com.stuypulse.stuylib.util.StopWatch; diff --git a/src/com/stuypulse/stuylib/streams/filters/MovingAverage.java b/src/com/stuypulse/stuylib/streams/numbers/filters/MovingAverage.java similarity index 96% rename from src/com/stuypulse/stuylib/streams/filters/MovingAverage.java rename to src/com/stuypulse/stuylib/streams/numbers/filters/MovingAverage.java index 39cba441..e327fcfa 100644 --- a/src/com/stuypulse/stuylib/streams/filters/MovingAverage.java +++ b/src/com/stuypulse/stuylib/streams/numbers/filters/MovingAverage.java @@ -2,7 +2,7 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams.filters; +package com.stuypulse.stuylib.streams.numbers.filters; import java.util.LinkedList; import java.util.Queue; diff --git a/src/com/stuypulse/stuylib/streams/filters/RateLimit.java b/src/com/stuypulse/stuylib/streams/numbers/filters/RateLimit.java similarity index 95% rename from src/com/stuypulse/stuylib/streams/filters/RateLimit.java rename to src/com/stuypulse/stuylib/streams/numbers/filters/RateLimit.java index 72584cd7..083c0cb1 100644 --- a/src/com/stuypulse/stuylib/streams/filters/RateLimit.java +++ b/src/com/stuypulse/stuylib/streams/numbers/filters/RateLimit.java @@ -2,7 +2,7 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams.filters; +package com.stuypulse.stuylib.streams.numbers.filters; import com.stuypulse.stuylib.math.SLMath; import com.stuypulse.stuylib.util.StopWatch; diff --git a/src/com/stuypulse/stuylib/streams/filters/TimedMovingAverage.java b/src/com/stuypulse/stuylib/streams/numbers/filters/TimedMovingAverage.java similarity index 98% rename from src/com/stuypulse/stuylib/streams/filters/TimedMovingAverage.java rename to src/com/stuypulse/stuylib/streams/numbers/filters/TimedMovingAverage.java index 0924417b..ec663dd7 100644 --- a/src/com/stuypulse/stuylib/streams/filters/TimedMovingAverage.java +++ b/src/com/stuypulse/stuylib/streams/numbers/filters/TimedMovingAverage.java @@ -2,7 +2,7 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams.filters; +package com.stuypulse.stuylib.streams.numbers.filters; import com.stuypulse.stuylib.util.StopWatch; diff --git a/src/com/stuypulse/stuylib/streams/filters/WeightedMovingAverage.java b/src/com/stuypulse/stuylib/streams/numbers/filters/WeightedMovingAverage.java similarity index 96% rename from src/com/stuypulse/stuylib/streams/filters/WeightedMovingAverage.java rename to src/com/stuypulse/stuylib/streams/numbers/filters/WeightedMovingAverage.java index b50ff15a..6458a9b2 100644 --- a/src/com/stuypulse/stuylib/streams/filters/WeightedMovingAverage.java +++ b/src/com/stuypulse/stuylib/streams/numbers/filters/WeightedMovingAverage.java @@ -2,7 +2,7 @@ /* This work is licensed under the terms of the MIT license */ /* found in the root directory of this project. */ -package com.stuypulse.stuylib.streams.filters; +package com.stuypulse.stuylib.streams.numbers.filters; /** * Implementation of Weighted Moving Average. In a Weighted moving average, each value in the diff --git a/src/com/stuypulse/stuylib/streams/filters/readme.md b/src/com/stuypulse/stuylib/streams/numbers/filters/readme.md similarity index 100% rename from src/com/stuypulse/stuylib/streams/filters/readme.md rename to src/com/stuypulse/stuylib/streams/numbers/filters/readme.md diff --git a/src/com/stuypulse/stuylib/streams/vectors/VStream.java b/src/com/stuypulse/stuylib/streams/vectors/VStream.java index fe5977ba..1517a997 100644 --- a/src/com/stuypulse/stuylib/streams/vectors/VStream.java +++ b/src/com/stuypulse/stuylib/streams/vectors/VStream.java @@ -5,8 +5,8 @@ package com.stuypulse.stuylib.streams.vectors; import com.stuypulse.stuylib.math.Vector2D; -import com.stuypulse.stuylib.streams.IStream; import com.stuypulse.stuylib.streams.angles.AStream; +import com.stuypulse.stuylib.streams.numbers.IStream; import com.stuypulse.stuylib.streams.vectors.filters.VFilter; import java.util.function.Supplier; diff --git a/src/com/stuypulse/stuylib/streams/vectors/filters/VDerivative.java b/src/com/stuypulse/stuylib/streams/vectors/filters/VDerivative.java index 29bb4a0c..09c55c2a 100644 --- a/src/com/stuypulse/stuylib/streams/vectors/filters/VDerivative.java +++ b/src/com/stuypulse/stuylib/streams/vectors/filters/VDerivative.java @@ -4,7 +4,7 @@ package com.stuypulse.stuylib.streams.vectors.filters; -import com.stuypulse.stuylib.streams.filters.Derivative; +import com.stuypulse.stuylib.streams.numbers.filters.Derivative; /** * Filter that takes the derivative of a VStream with respect to time. diff --git a/src/com/stuypulse/stuylib/streams/vectors/filters/VFilter.java b/src/com/stuypulse/stuylib/streams/vectors/filters/VFilter.java index 851b9c8d..491d3271 100644 --- a/src/com/stuypulse/stuylib/streams/vectors/filters/VFilter.java +++ b/src/com/stuypulse/stuylib/streams/vectors/filters/VFilter.java @@ -5,7 +5,7 @@ package com.stuypulse.stuylib.streams.vectors.filters; import com.stuypulse.stuylib.math.Vector2D; -import com.stuypulse.stuylib.streams.filters.IFilter; +import com.stuypulse.stuylib.streams.numbers.filters.IFilter; /** * This is the VFilter interface class that gives a definition for how to implement a filter. diff --git a/src/com/stuypulse/stuylib/streams/vectors/filters/VHighPassFilter.java b/src/com/stuypulse/stuylib/streams/vectors/filters/VHighPassFilter.java index 5bfc4dd1..bf0a0e93 100644 --- a/src/com/stuypulse/stuylib/streams/vectors/filters/VHighPassFilter.java +++ b/src/com/stuypulse/stuylib/streams/vectors/filters/VHighPassFilter.java @@ -4,7 +4,7 @@ package com.stuypulse.stuylib.streams.vectors.filters; -import com.stuypulse.stuylib.streams.filters.HighPassFilter; +import com.stuypulse.stuylib.streams.numbers.filters.HighPassFilter; /** * A filter that applies a HighPassFilter to a VStream diff --git a/src/com/stuypulse/stuylib/streams/vectors/filters/VIntegral.java b/src/com/stuypulse/stuylib/streams/vectors/filters/VIntegral.java index 26fa3d24..b8ece0de 100644 --- a/src/com/stuypulse/stuylib/streams/vectors/filters/VIntegral.java +++ b/src/com/stuypulse/stuylib/streams/vectors/filters/VIntegral.java @@ -4,7 +4,7 @@ package com.stuypulse.stuylib.streams.vectors.filters; -import com.stuypulse.stuylib.streams.filters.Integral; +import com.stuypulse.stuylib.streams.numbers.filters.Integral; /** * A filter that integrates a VStream with respect to time. diff --git a/src/com/stuypulse/stuylib/streams/vectors/filters/VLowPassFilter.java b/src/com/stuypulse/stuylib/streams/vectors/filters/VLowPassFilter.java index 047a447c..0a9aec88 100644 --- a/src/com/stuypulse/stuylib/streams/vectors/filters/VLowPassFilter.java +++ b/src/com/stuypulse/stuylib/streams/vectors/filters/VLowPassFilter.java @@ -4,7 +4,7 @@ package com.stuypulse.stuylib.streams.vectors.filters; -import com.stuypulse.stuylib.streams.filters.LowPassFilter; +import com.stuypulse.stuylib.streams.numbers.filters.LowPassFilter; /** * A filter that applies a LowPassFilter to a VStream diff --git a/src/com/stuypulse/stuylib/streams/vectors/filters/VMovingAverage.java b/src/com/stuypulse/stuylib/streams/vectors/filters/VMovingAverage.java index e564129c..e57630db 100644 --- a/src/com/stuypulse/stuylib/streams/vectors/filters/VMovingAverage.java +++ b/src/com/stuypulse/stuylib/streams/vectors/filters/VMovingAverage.java @@ -4,7 +4,7 @@ package com.stuypulse.stuylib.streams.vectors.filters; -import com.stuypulse.stuylib.streams.filters.MovingAverage; +import com.stuypulse.stuylib.streams.numbers.filters.MovingAverage; /** * A filter that takes a moving average of a VStream diff --git a/src/com/stuypulse/stuylib/streams/vectors/filters/VTimedMovingAverage.java b/src/com/stuypulse/stuylib/streams/vectors/filters/VTimedMovingAverage.java index 62ea9cce..e559307b 100644 --- a/src/com/stuypulse/stuylib/streams/vectors/filters/VTimedMovingAverage.java +++ b/src/com/stuypulse/stuylib/streams/vectors/filters/VTimedMovingAverage.java @@ -4,7 +4,7 @@ package com.stuypulse.stuylib.streams.vectors.filters; -import com.stuypulse.stuylib.streams.filters.TimedMovingAverage; +import com.stuypulse.stuylib.streams.numbers.filters.TimedMovingAverage; /** * A filter that takes a timed moving average of a VStream diff --git a/src/com/stuypulse/stuylib/streams/vectors/filters/VWeightedMovingAverage.java b/src/com/stuypulse/stuylib/streams/vectors/filters/VWeightedMovingAverage.java index 32195847..d831f03e 100644 --- a/src/com/stuypulse/stuylib/streams/vectors/filters/VWeightedMovingAverage.java +++ b/src/com/stuypulse/stuylib/streams/vectors/filters/VWeightedMovingAverage.java @@ -4,7 +4,7 @@ package com.stuypulse.stuylib.streams.vectors.filters; -import com.stuypulse.stuylib.streams.filters.WeightedMovingAverage; +import com.stuypulse.stuylib.streams.numbers.filters.WeightedMovingAverage; /** * A filter that takes a weighted moving average of a VStream diff --git a/src/com/stuypulse/stuylib/streams/vectors/filters/XYFilter.java b/src/com/stuypulse/stuylib/streams/vectors/filters/XYFilter.java index 819d7cde..c20f11c5 100644 --- a/src/com/stuypulse/stuylib/streams/vectors/filters/XYFilter.java +++ b/src/com/stuypulse/stuylib/streams/vectors/filters/XYFilter.java @@ -5,7 +5,7 @@ package com.stuypulse.stuylib.streams.vectors.filters; import com.stuypulse.stuylib.math.Vector2D; -import com.stuypulse.stuylib.streams.filters.IFilter; +import com.stuypulse.stuylib.streams.numbers.filters.IFilter; /** * A filter that applies separate IFilters to the x and y component of a VFilter diff --git a/src/com/stuypulse/stuylib/util/plot/FuncSeries.java b/src/com/stuypulse/stuylib/util/plot/FuncSeries.java index e46239f4..b2957d4d 100644 --- a/src/com/stuypulse/stuylib/util/plot/FuncSeries.java +++ b/src/com/stuypulse/stuylib/util/plot/FuncSeries.java @@ -4,11 +4,11 @@ package com.stuypulse.stuylib.util.plot; -import com.stuypulse.stuylib.streams.filters.IFilter; - import java.util.ArrayList; import java.util.List; +import com.stuypulse.stuylib.streams.numbers.filters.IFilter; + /** * A FuncSeries plots a function (IFilter) over a given domain. * diff --git a/src/com/stuypulse/stuylib/util/plot/Playground.java b/src/com/stuypulse/stuylib/util/plot/Playground.java index 3cbe468e..dd861ced 100644 --- a/src/com/stuypulse/stuylib/util/plot/Playground.java +++ b/src/com/stuypulse/stuylib/util/plot/Playground.java @@ -15,7 +15,8 @@ import com.stuypulse.stuylib.streams.angles.filters.ARateLimit; import com.stuypulse.stuylib.streams.booleans.*; import com.stuypulse.stuylib.streams.booleans.filters.*; -import com.stuypulse.stuylib.streams.filters.*; +import com.stuypulse.stuylib.streams.numbers.IStream; +import com.stuypulse.stuylib.streams.numbers.filters.*; import com.stuypulse.stuylib.streams.vectors.*; import com.stuypulse.stuylib.streams.vectors.filters.*; import com.stuypulse.stuylib.util.plot.FuncSeries.Domain; diff --git a/src/com/stuypulse/stuylib/util/plot/TimeSeries.java b/src/com/stuypulse/stuylib/util/plot/TimeSeries.java index dbc8c459..14243978 100644 --- a/src/com/stuypulse/stuylib/util/plot/TimeSeries.java +++ b/src/com/stuypulse/stuylib/util/plot/TimeSeries.java @@ -4,12 +4,12 @@ package com.stuypulse.stuylib.util.plot; -import com.stuypulse.stuylib.streams.IStream; - import java.util.ArrayList; import java.util.LinkedList; import java.util.List; +import com.stuypulse.stuylib.streams.numbers.IStream; + /** * A TimeSeries is used to plot a stream of values (IStream) that changes over time. *