Skip to content
Prev 86 / 523 Next

[RsR] covrob --- some OOP-comments

Yes, everything is in the last line, but I still do not know which object 
will be modified.
In C++ and friends I would define
    dist=null;
in the constructor and then write a get-accessor like this

vector getDistance(){
    if(dist==null)
        dist = computeDIstance();
    return dist;
}
I had S4 classes in mind, but it is not that easy to express this in UML:
particularly, the classes Cov, Mcd, Ogk and Mest are S4 classes returned by
the functions cov, covMcd, covOgk and covMest respectively. Most of their
methods - show/plot/summary - are implemented for Cov or the abstract CovR
and can be applied polymorphic on the subclasses.
...

this needs further thinking and discussing...
have a look at my implementation of the psi-functions used for the 
constrained
M-estimates in covMest() in the new version of rrcov that I uploaded 
yesterday
(still stays in Incoming, I'll send it you offline).
very important. A straightforward, !OOP implementation can be more than
twice faster than S4 implementation. I'll provide some more computational
evidence.
this particular diagram was done with ArgoUML, but I am still not satisfied.
Before I was using Objecteering, but they have a complicated licensing 
model.
The best that I have used for a long time was Rational Rose: comercial and
extremely expensive, later I used TogetherJ. I do not know what happened,
I am afraid Borland bought them. More on this topic - offline.

best regards,
Valentin