Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17305


Ignore:
Timestamp:
10/03/19 14:39:46 (5 years ago)
Author:
chaider
Message:

#3032 Added absolute operation for intervals

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval.cs

    r17301 r17305  
    231231      return new Interval(lower, upper);
    232232    }
     233
     234    public static Interval Absolute(Interval a) {
     235      var absLower = Math.Abs(a.LowerBound);
     236      var absUpper = Math.Abs(a.UpperBound);
     237      return new Interval(Math.Min(absLower, absUpper), Math.Max(absLower, absUpper));
     238    }
    233239    #endregion
    234240  }
Note: See TracChangeset for help on using the changeset viewer.