Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/03/17 12:48:46 (7 years ago)
Author:
pkimmesw
Message:

#2665 Added Dictionary of stacks to interperter, clear all stacks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Stack/PushStack.cs

    r14909 r14914  
    66
    77  /// <summary>
    8   ///     While Push's stacks are generally treated as genuine stacks---that is, inclassions take their arguments from the
     8  ///     While Push's Stacks are generally treated as genuine Stacks---that is, inclassions take their arguments from the
    99  ///     tops of
    10   ///     the stacks and push their results onto the tops of the stacks---a few inclassions (like YANK and SHOVE) do allow
     10  ///     the Stacks and push their results onto the tops of the Stacks---a few inclassions (like YANK and SHOVE) do allow
    1111  ///     direct access
    12   ///     to "deep" stack elements by means of integer indices. To this extent the stacks can be used as general, random
     12  ///     to "deep" stack elements by means of integer indices. To this extent the Stacks can be used as general, random
    1313  ///     access memory
    1414  ///     classures. This is one of the features that ensures the Turing-completeness of Push (another being the arbitrary
     
    279279      return string.Join(Delimiter, data.Reverse());
    280280    }
     281
     282    IEnumerable<string> IPushStack.AsStrings() {
     283      return data.Select(x => x.ToString());
     284    }
     285
     286    IEnumerable<object> IPushStack.AsObjects() {
     287      return data.OfType<object>();
     288    }
    281289  }
    282290}
Note: See TracChangeset for help on using the changeset viewer.