source: trunk/EventBenchCore/src/de/ugoe/cs/eventbench/markov/IMemory.java @ 1

Last change on this file since 1 was 1, checked in by sherbold, 13 years ago
File size: 970 bytes
Line 
1package de.ugoe.cs.eventbench.markov;
2
3import java.util.List;
4
5/**
6 * <p>
7 * This interface defines basic functions for classes that implement a memory
8 * about the recent events of a sequences.
9 * </p>
10 *
11 * @author Steffen Herbold
12 * @version 1.0
13 *
14 * @param <T>
15 *            Type of the sequence elements that are memorized.
16 */
17public interface IMemory<T> {
18
19        /**
20         * Adds an element to the end of the memory.
21         *
22         * @param element
23         *            Element to be added.
24         */
25        public void add(T element);
26
27        /**
28         * <p>
29         * Returns the last <code>num</code> memorized elements. If the history is
30         * shorter than <code>num</code>, the length of the returned
31         * {@link java.util.List} may be less than <code>num</code>.
32         * </p>
33         *
34         * @param num
35         *            Number of states from the end of the memory to be returned.
36         * @return {@link java.util.List} of memorized elements.
37         */
38        public List<T> getLast(int num);
39
40}
Note: See TracBrowser for help on using the repository browser.