Changeset 86


Ignore:
Timestamp:
06/23/11 14:02:05 (13 years ago)
Author:
sherbold
Message:
  • made stochastic models and events serializable
Location:
trunk/EventBenchCore/src/de/ugoe/cs/eventbench
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/IReplayDecorator.java

    r56 r86  
    11package de.ugoe.cs.eventbench; 
    22 
    3 public interface IReplayDecorator { 
     3import java.io.Serializable; 
     4 
     5public interface IReplayDecorator extends Serializable { 
    46         
    57        String getHeader(); 
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/data/Event.java

    r79 r86  
    11package de.ugoe.cs.eventbench.data; 
    22 
     3import java.io.Serializable; 
    34import java.security.InvalidParameterException; 
    45 
     
    1617 *            without subclassing. 
    1718 */ 
    18 public class Event<T> { 
     19public class Event<T> implements Serializable { 
     20 
     21        /** 
     22         * Id for object serialization. 
     23         */ 
     24        private static final long serialVersionUID = 1L; 
    1925 
    2026        /** 
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/data/IReplayable.java

    r79 r86  
    11package de.ugoe.cs.eventbench.data; 
     2 
     3import java.io.Serializable; 
    24 
    35/** 
     
    1113 * @version 1.0 
    1214 */ 
    13 public interface IReplayable { 
     15public interface IReplayable extends Serializable { 
    1416 
    1517        /** 
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/data/ReplayableEvent.java

    r79 r86  
    2222 */ 
    2323public class ReplayableEvent<T extends IReplayable> extends Event<T> { 
     24 
     25        /** 
     26         * Id for object serialization. 
     27         */ 
     28        private static final long serialVersionUID = 1L; 
    2429 
    2530        /** 
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/FirstOrderMarkovModel.java

    r29 r86  
    1616public class FirstOrderMarkovModel extends HighOrderMarkovModel implements IDotCompatible { 
    1717 
     18        /** 
     19         * Id for object serialization. 
     20         */ 
     21        private static final long serialVersionUID = 1L; 
     22         
    1823        final static int MAX_STATDIST_ITERATIONS = 1000; 
    1924         
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/HighOrderMarkovModel.java

    r80 r86  
    99public class HighOrderMarkovModel extends TrieBasedModel { 
    1010         
     11        /** 
     12         * Id for object serialization. 
     13         */ 
     14        private static final long serialVersionUID = 1L; 
     15 
    1116        public HighOrderMarkovModel(int maxOrder, Random r) { 
    1217                super(maxOrder, r); 
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/IStochasticProcess.java

    r80 r86  
    11package de.ugoe.cs.eventbench.models; 
    22 
     3import java.io.Serializable; 
    34import java.util.List; 
    45import java.util.Set; 
     
    67import de.ugoe.cs.eventbench.data.Event; 
    78 
    8 public interface IStochasticProcess { 
     9public interface IStochasticProcess extends Serializable { 
    910         
    1011        double getProbability(List<Event<?>> context, Event<?> symbol); 
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/PredictionByPartialMatch.java

    r80 r86  
    88 
    99public class PredictionByPartialMatch extends TrieBasedModel { 
     10         
     11        /** 
     12         * Id for object serialization. 
     13         */ 
     14        private static final long serialVersionUID = 1L; 
    1015         
    1116        double probEscape; 
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/Trie.java

    r66 r86  
    11package de.ugoe.cs.eventbench.models; 
    22 
     3import java.io.Serializable; 
    34import java.util.LinkedHashSet; 
    45import java.util.LinkedList; 
     
    1112import edu.uci.ics.jung.graph.Tree; 
    1213 
    13 public class Trie<T> implements IDotCompatible { 
     14public class Trie<T> implements IDotCompatible, Serializable { 
    1415         
     16        /** 
     17         * Id for object serialization. 
     18         */ 
     19        private static final long serialVersionUID = 1L; 
     20 
    1521        private Set<T> knownSymbols; 
    1622         
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/TrieBasedModel.java

    r80 r86  
    1212 
    1313public abstract class TrieBasedModel implements IStochasticProcess { 
     14 
     15        /** 
     16         * Id for object serialization. 
     17         */ 
     18        private static final long serialVersionUID = 1L; 
    1419 
    1520        protected int trieOrder; 
  • trunk/EventBenchCore/src/de/ugoe/cs/eventbench/models/TrieNode.java

    r30 r86  
    11package de.ugoe.cs.eventbench.models; 
    22 
     3import java.io.Serializable; 
    34import java.security.InvalidParameterException; 
    45import java.util.LinkedList; 
     
    1112 
    1213 
    13 class TrieNode<T> { 
     14class TrieNode<T> implements Serializable { 
     15         
     16        /** 
     17         * Id for object serialization. 
     18         */ 
     19        private static final long serialVersionUID = 1L; 
    1420         
    1521        private int count; 
Note: See TracChangeset for help on using the changeset viewer.