Free cookie consent management tool by TermsFeed Policy Generator

source: branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Stack/IStack.cs @ 14744

Last change on this file since 14744 was 14727, checked in by pkimmesw, 8 years ago

#2665 PushGP HL Integration, Views, Parameters

File size: 1.1 KB
RevLine 
[14727]1namespace HeuristicLab.Problems.ProgramSynthesis.Push.Stack {
2  using System;
3  using System.Collections.Generic;
4
5  public interface IStack<T> : ICollection<T> {
6    bool IsEmpty { get; }
7
8    bool IsEnabled { get; }
9    T Top { get; }
10
11    T TopOrDefault { get; }
12
13    T Bottom { get; }
14
15    T BottomOrDefault { get; }
16
17    T this[int key] { get; set; }
18
19    void Swap(int count);
20
21    void Yank(int index);
22
23    void Push(T item);
24
25    void Push(params T[] items);
26    void ReversePush(params T[] items);
27
28    void Push(IReadOnlyList<T> items);
29
30    T Peek();
31
32    T[] Peek(int count);
33
34    void PushResult(int count, Func<T[], T> templateFunc);
35
36    void Insert(int index, T item);
37
38    void Insert(int index, params T[] items);
39
40    void Insert(int index, IEnumerable<T> items);
41
42    T ReverseElementAt(int offset);
43
44    void SetTop(T value);
45
46    void RemoveTop();
47
48    void Remove(int count);
49
50    void RemoveAt(int index);
51
52    void RemoveAt(int index, int count);
53
54    T Pop();
55
56    T[] Pop(int count);
57
58    bool TryPop(out T item);
59
60    T ElementAt(int index);
61  }
62}
Note: See TracBrowser for help on using the repository browser.