24 package org.lightjason.agentspeak.action.builtin.math.blas.matrix;
26 import cern.colt.matrix.tdouble.DoubleFactory2D;
27 import cern.colt.matrix.tdouble.DoubleMatrix2D;
28 import cern.colt.matrix.tdouble.impl.DenseDoubleMatrix1D;
37 import javax.annotation.Nonnegative;
38 import javax.annotation.Nonnull;
39 import java.util.List;
40 import java.util.stream.IntStream;
76 @Nonnull
final List<ITerm> p_argument, @Nonnull
final List<ITerm> p_return )
79 .map(
ITerm::<DoubleMatrix2D>raw )
82 final DoubleMatrix2D l_degree = DoubleFactory2D
84 .diagonal(
new DenseDoubleMatrix1D( IntStream.range( 0, i.rows() ).mapToDouble( j -> i.viewRow( j ).cardinality() ).toArray() ) );
89 .forEach( p_return::add );
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 final long serialVersionUID
serial id
static< N > IFuzzyValue< N > from( @Nonnull final N p_value)
factory
common structure for execution definition
execution context with local data
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 int minimalArgumentNumber()
minimum number of arguments
result for an immutable fuzzy value
creates the normalized graph laplacian.
static< N > CRawTerm< N > from(final N p_value)
factory for a raw term
blas algebra operations e.g.
CNormalizedGraphLaplacian()
ctor
term structure for simple datatypes