Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/23/18 19:49:16 (6 years ago)
Author:
gkronber
Message:

#2925: implemented interface to CVODES solver with forward sensitivity calculation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/Vector.cs

    r16249 r16251  
    7878    }
    7979
     80    public double this[int idx] {
     81      get {
     82        if (this == Vector.Zero) return 0.0;
     83        else return arr[idx];
     84      }
     85      set {
     86        if (this == Vector.Zero) throw new InvalidOperationException();
     87        else arr[idx] = value;
     88      }
     89    }
     90
     91    public int Length {
     92      get {
     93        if (this == Vector.Zero) throw new InvalidOperationException();
     94        else return arr.Length;
     95      }
     96    }
     97
    8098    private readonly double[] arr; // backing array;
    8199
Note: See TracChangeset for help on using the changeset viewer.