neureka.fluent.building.states.IterByOrIterFromOrAll Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neureka Show documentation
Show all versions of neureka Show documentation
A platform independent tensor library written in Java.
The newest version!
package neureka.fluent.building.states;
import neureka.Nda;
import neureka.Tensor;
import neureka.ndim.Filler;
import java.util.List;
public interface IterByOrIterFromOrAll
{
/**
* Provide an array of values which will be used to fill
* the {@link Tensor} instance returned by this last fluent builder method.
* If the configured tensor is larger than the number of provided
* elements, then they will simply be read multiple times until
* the result has been sufficiently populated.
*
* @param values The values which will be used to populate the {@link Tensor} instance returned by this method.
* @return The final result of the fluent tensor builder API having a tensor filled with custom values.
*/
Nda andFill( V... values );
/**
* Provide a list of values which will be used to fill
* the {@link Tensor} instance returned by this last fluent builder method.
* If the configured tensor is larger than the number of provided
* elements, then they will simply be read multiple times until
* the result has been sufficiently populated.
*
* @param values The values which will be used to populate the {@link Tensor} instance returned by this method.
* @return The final result of the fluent tensor builder API having a tensor filled with custom values.
*/
Nda andFill( List values );
/**
* Pass a lambda to this method which will be used to populate the {@link Tensor}
* built by this fluent builder API based on the indices of the tensor.
* The lambda will receive the absolute index ranging from 0 to {@link Tensor#size()}
* as well as an array of shape based nd-indices which can be used to
* initialize the underlying data of the {@link Tensor} more selectively.
*
* @param filler A data element provider lambda mapping the indices to custom values.
* @return The resulting {@link Tensor} instance populated by the provided {@link Filler}.
*/
Nda andWhere( Filler filler );
/**
* This part of the builder API allows for specifying a range which starts from the
* provided value and will end at the value specified in the next
* builder step returned by this method.
* If the number in the created range is not sufficiently large enough to
* fully populate the final {@link Tensor} instance built by this API, then the resulting
* range will fill the underlying data array of the tensor recurrently.
*
* @param index The start of the range which ought to supply the {@link Tensor} instance built by this API.
* @return The next step in the builder method chain which expects to receive the end point of the range.
*/
To andFillFrom( V index );
/**
* This method creates and return a {@link Tensor} instance which
* will be homogeneously filled by the the provided value irrespective
* of the previously defined shape.
*
* @param value The value which ought to populate the entire {@link Tensor}.
* @return The homogeneously populated {@link Tensor} instance.
*/
Nda all( V value );
/**
* This method creates and return a {@link Tensor} instance which
* will be filled based on the provided seed object.
* The seed can be any object whose hash will serve as a basis for
* supplying the tensor with random data...
*
* @param seed The seed based on which the value for populating the entire {@link Tensor} will be generated.
* @return The pseudo randomly populated {@link Tensor} instance.
*/
Nda andSeed( Object seed );
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy