24 package org.lightjason.agentspeak.action.builtin.math.blas.matrix;
26 import cern.colt.matrix.tdouble.DoubleFactory2D;
27 import cern.colt.matrix.tdouble.DoubleMatrix1D;
28 import cern.colt.matrix.tdouble.DoubleMatrix2D;
38 import javax.annotation.Nonnegative;
39 import javax.annotation.Nonnull;
40 import java.util.List;
73 @Nonnull
final List<ITerm> p_argument, @Nonnull
final List<ITerm> p_return )
79 .map(
ITerm::<String>raw )
85 .map(
ITerm::<DoubleMatrix1D>raw )
88 .forEach( p_return::add );
102 private static DoubleMatrix2D
generate( @Nonnull
final DoubleMatrix1D p_elements, @Nonnull
final EType p_type )
106 case DENSE:
return DoubleFactory2D.dense.diagonal( p_elements );
107 default:
return DoubleFactory2D.sparse.diagonal( p_elements );
returns a diagonal matrix.
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory
common structure for execution definition
static DoubleMatrix2D generate( @Nonnull final DoubleMatrix1D p_elements, @Nonnull final EType p_type)
generates the diagonal matrix
static final long serialVersionUID
serial id
execution context with local data
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
static Stream< ITerm > flatten( @Nonnull final Collection<? extends ITerm > p_terms)
flat term-in-term collection into a straight term list
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 EType from(final String p_name)
additional factory
final int minimalArgumentNumber()
minimum number of arguments
static< N > CRawTerm< N > from(final N p_value)
factory for a raw term
blas algebra operations e.g.
term structure for simple datatypes