Package br.unip.aps.analysis
Record Class EstatisticaDescritiva.Regressao
java.lang.Object
java.lang.Record
br.unip.aps.analysis.EstatisticaDescritiva.Regressao
- Enclosing class:
EstatisticaDescritiva
public static record EstatisticaDescritiva.Regressao(double intercepto, double inclinacao, double r2)
extends Record
Resultado de regressao linear y = a + b·x.
-
Constructor Summary
ConstructorsConstructorDescriptionRegressao(double intercepto, double inclinacao, double r2) Creates an instance of aRegressaorecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theinclinacaorecord component.doubleReturns the value of theinterceptorecord component.doubler2()Returns the value of ther2record component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Regressao
public Regressao(double intercepto, double inclinacao, double r2) Creates an instance of aRegressaorecord class.- Parameters:
intercepto- the value for theinterceptorecord componentinclinacao- the value for theinclinacaorecord componentr2- the value for ther2record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared with '=='. -
intercepto
public double intercepto()Returns the value of theinterceptorecord component.- Returns:
- the value of the
interceptorecord component
-
inclinacao
public double inclinacao()Returns the value of theinclinacaorecord component.- Returns:
- the value of the
inclinacaorecord component
-
r2
public double r2()Returns the value of ther2record component.- Returns:
- the value of the
r2record component
-