24 package org.lightjason.agentspeak.action.builtin.math.blas.matrix;
26 import cern.colt.matrix.tdouble.DoubleMatrix1D;
27 import cern.colt.matrix.tdouble.DoubleMatrix2D;
28 import cern.colt.matrix.tdouble.impl.DenseDoubleMatrix2D;
29 import com.codepoetics.protonpack.StreamUtils;
38 import javax.annotation.Nonnegative;
39 import javax.annotation.Nonnull;
40 import java.util.List;
69 @SuppressWarnings(
"unchecked" )
71 @Nonnull final List<
ITerm> p_argument, @Nonnull final List<
ITerm> p_return )
79 .forEach( p_return::add );
91 private static DoubleMatrix2D
result( @Nonnull
final ITerm p_term )
94 return p_term.<DoubleMatrix2D>raw();
96 final DoubleMatrix2D l_result =
new DenseDoubleMatrix2D( Long.valueOf( p_term.<DoubleMatrix1D>raw().size() ).intValue(), 1 );
97 l_result.viewColumn( 0 ).assign( p_term.<DoubleMatrix1D>raw() );
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory
common structure for execution definition
execution context with local data
static final long serialVersionUID
serial id
static final DenseDoubleAlgebra DENSEALGEBRA
dense algebra
static Stream< ITerm > flatten( @Nonnull final Collection<? extends ITerm > p_terms)
flat term-in-term collection into a straight term list
final IFuzzyValue< Boolean > execute(final boolean p_parallel, @Nonnull final IContext p_context, @Nonnull final List< ITerm > p_argument, @Nonnull final List< ITerm > p_return)
defines a plan-body operation
solver of matrix-equation.
static DoubleMatrix2D result( @Nonnull final ITerm p_term)
creates a matrix from the input term
static< T > boolean rawvalueAssignableTo( @Nonnull final T p_value, @Nonnull final Class<?>... p_class)
checks a term value for assignable class
result for an immutable fuzzy value
static< N > CRawTerm< N > from(final N p_value)
factory for a raw term
blas algebra operations e.g.
final int minimalArgumentNumber()
minimum number of arguments
term structure for simple datatypes