commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-1087) private vars in MixtureMultivariateRealDistribution
Date Mon, 13 Jan 2014 17:52:55 GMT

    [ https://issues.apache.org/jira/browse/MATH-1087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13869743#comment-13869743
] 

Gilles commented on MATH-1087:
------------------------------

bq. May I have question [...]

Certainly, but questions should be asked on the mailing list:
  dev@commons.apache.org
Cf. http://commons.apache.org/proper/commons-math/mail-lists.html

You should expose what you are actually trying to achieve. Instance fields must be private
by default.
"MixtureMultivariateNormalDistribution" is a subclass and it did not need access to those
fields.


> private vars in MixtureMultivariateRealDistribution
> ---------------------------------------------------
>
>                 Key: MATH-1087
>                 URL: https://issues.apache.org/jira/browse/MATH-1087
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.2
>            Reporter: Jirka Borovec
>              Labels: features
>             Fix For: 3.3
>
>   Original Estimate: 0.1h
>  Remaining Estimate: 0.1h
>
> May I have question why the variables
>     private final double[] weight;
>     private final List<T> distribution;
> in MixtureMultivariateRealDistribution are private not only protected. I wanted to extend
this class for some other distributions but after inheriting they are not accessible so difficult
to handle. Even I cannot save the list anywhere else  in child because in constructor and
also in the getter it creates a new list with these components.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message