Record Class DiscreteMixture.Component
java.lang.Object
java.lang.Record
smile.stat.distribution.DiscreteMixture.Component
- Record Components:
priori- the priori probability of component.distribution- the distribution of component.
- Enclosing class:
DiscreteMixture
public static record DiscreteMixture.Component(double priori, DiscreteDistribution distribution)
extends Record
A component in the mixture distribution is defined by a distribution
and its weight in the mixture.
-
Constructor Summary
ConstructorsConstructorDescriptionComponent(double priori, DiscreteDistribution distribution) Creates an instance of aComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedistributionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublepriori()Returns the value of thepriorirecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Component
Creates an instance of aComponentrecord class.- Parameters:
priori- the value for thepriorirecord componentdistribution- the value for thedistributionrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
priori
-
distribution
Returns the value of thedistributionrecord component.- Returns:
- the value of the
distributionrecord component
-