Changeset 211 for trunk/regress.d

Show
Ignore:
Timestamp:
08/22/10 21:53:08 (1 year ago)
Author:
dsimcha
Message:

Fix ranges: Add save() and @property stuff.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/regress.d

    r209 r211  
    6363    } 
    6464 
    65     double front() const pure nothrow { 
     65    @property double front() const pure nothrow { 
    6666        return cache; 
    6767    } 
     
    7474    } 
    7575 
    76     typeof(this) save() @property
     76    @property typeof(this) save()
    7777        return this; 
    7878    } 
    7979 
    80     bool empty() @property
     80    @property bool empty()
    8181        return range.empty; 
    8282    } 
     
    277277        size_t i = 0; 
    278278        foreach(elem; X) { 
    279             double frnt = elem.front()
     279            double frnt = elem.front
    280280            sum += frnt * betas[i]; 
    281281            i++; 
     
    309309    } 
    310310 
    311     double front() const pure nothrow { 
     311    @property double front() const pure nothrow { 
    312312        return residual; 
    313313    } 
     
    329329    } 
    330330 
    331     bool empty() const pure nothrow { 
     331    @property bool empty() const pure nothrow { 
    332332        return _empty; 
    333333    } 
    334334 
    335     typeof(this) save() @property
     335    @property typeof(this) save()
    336336        auto ret = this; 
    337337        ret.Y = ret.Y.save; 
     
    512512        double residual = residuals.front; 
    513513        S += residual * residual; 
    514         double Yfront = residuals.Y.front()
     514        double Yfront = residuals.Y.front
    515515        double predicted = Yfront - residual; 
    516516        R2Calc.put(predicted, Yfront);