Documentation of 'bayesnet.jayes.factor.SparseFactor' Java class
SparseFactor
bayesnet.jayes.factor

Class SparseFactor

  • All Implemented Interfaces:
    java.lang.Cloneable


    public class SparseFactor
    extends AbstractFactor
    implements java.lang.Cloneable
    • Constructor Detail

      • SparseFactor

        public SparseFactor()
    • Method Detail

      • multiplyCompatible

        public void multiplyCompatible(AbstractFactor compatible)
        Description copied from class: AbstractFactor
        multiply the factors. Only compatible factors are allowed, meaning ones that have a subset of the variables of this factor (assume consistent Dimension ID / size pairs)
        Overrides:
        multiplyCompatible in class AbstractFactor
      • sparsify

        public void sparsify(AbstractFactor... compatible)
        Prepares the factor in the sense that it's internal structures are optimized according to the zero/non-zero structure of the factors that will be multiplied in. This method should always and only be called once before any call that modifies this factor's values
        Parameters:
        compatible - a Factor with compatible dimensions
      • getOverhead

        public int getOverhead()
        Specified by:
        getOverhead in class AbstractFactor
        Returns:
        approximated memory requirements on top of the value array
      • isSuitable

        public static boolean isSuitable(int futureLength,
                                         AbstractFactor... multiplicationCandidates)
        approximates whether creating a sparse factor will save memory compared to a dense factor
        Parameters:
        futureLength - the length that the new factor's value array would have in a dense factor
        multiplicationCandidates -
        Returns:

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.