Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/12/17 13:16:56 (8 years ago)
Author:
pkimmesw
Message:

#2665 fixed enable/disable issue for single instruction in selection view

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Data/Pool/ManagedPoolProvider.cs

    r14746 r14747  
    2121    public const int DefaultMaxInstanceCount = 65536;
    2222
    23     public ManagedPoolProvider(int partitionSize, int maxPartitionCount = -1) {
     23    public ManagedPoolProvider(int partitionSize, int? maxPartitionCount = null) {
    2424      PartitionSize = partitionSize;
     25      MaxParitionCount = maxPartitionCount ?? DefaultMaxInstanceCount / PartitionSize;
    2526
    26       if (maxPartitionCount <= 0) {
    27         MaxParitionCount = DefaultMaxInstanceCount / PartitionSize;
    28       }
    29 
    30       managedPools = new ObjectPool<IManagedPool<T>>(() => new ManagedPool2<T>(this));
     27      managedPools = new ObjectPool<IManagedPool<T>>(() => new ManagedPool<T>(this));
    3128    }
    3229
     
    6562    }
    6663
    67     private class ManagedPool2<T> : IManagedPool<T> where T : class {
     64    private class ManagedPool<T> : IManagedPool<T> where T : class {
    6865      private readonly ManagedPoolProvider<T> provider;
    6966      private readonly IList<T[]> partitions = new List<T[]>();
     
    7168      private int entryIndex;
    7269
    73       public ManagedPool2(ManagedPoolProvider<T> provider) {
     70      public ManagedPool(ManagedPoolProvider<T> provider) {
    7471        this.provider = provider;
    7572        entryIndex = provider.PartitionSize;
Note: See TracChangeset for help on using the changeset viewer.