Class StreamConverters
java.lang.Object
org.episteme.core.mathematics.util.StreamConverters
Utility class for converting between primitive streams and Episteme types.
Provides stream conversion methods for:
- DoubleStream to Stream<Real>
- Stream<Real> to DoubleStream
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptionfromDoubleObjects(Stream<Double> stream) Converts a Stream<Double> to Stream<Real>.static DoubleStreamConverts a Stream<Real> to DoubleStream.toDoubleObjects(Stream<Real> stream) Converts a Stream<Real> to Stream<Double>.toReal(DoubleStream stream) Converts a DoubleStream to Stream<Real>.
-
Method Details
-
toReal
Converts a DoubleStream to Stream<Real>.- Parameters:
stream- the input DoubleStream- Returns:
- Stream of Real values
-
toDouble
Converts a Stream<Real> to DoubleStream.- Parameters:
stream- the input Stream of Real values- Returns:
- DoubleStream of primitive double values
-
fromDoubleObjects
-
toDoubleObjects
-