001 package cnslab.cnsnetwork; 002 003 import java.io.Serializable; 004 import java.util.Collection; 005 006 import edu.jhu.mb.ernst.engine.DiscreteEvent; 007 008 /*********************************************************************** 009 * Subexperiment. 010 * 011 * @version 012 * $Date: 2012-08-04 13:43:22 -0500 (Sat, 04 Aug 2012) $ 013 * $Rev: 104 $ 014 * $Author: croft $ 015 * @author 016 * Yi Dong 017 * @author 018 * David Wallace Croft 019 ***********************************************************************/ 020 public final class SubExp 021 implements Serializable, Transmissible 022 //////////////////////////////////////////////////////////////////////// 023 //////////////////////////////////////////////////////////////////////// 024 { 025 026 private static final long serialVersionUID = 0L; 027 028 // 029 030 /** stimulus for this subexp */ 031 public Stimulus [ ] stimuli; 032 033 /** number of repetitions or trials */ 034 public int repetition; 035 036 /** the length of the trials */ 037 public double trialLength; 038 039 /** subexp name */ 040 public String name; 041 042// TODO: DiscreteEvent not Serializable and Transmissible 043 044 private final Collection<DiscreteEvent> discreteEventCollection; 045 046 //////////////////////////////////////////////////////////////////////// 047 // constructor methods 048 //////////////////////////////////////////////////////////////////////// 049 050 public SubExp ( 051 final int repetition, 052 final double trialLength, 053 final Stimulus [ ] stimuli, 054 final Collection<DiscreteEvent> discreteEventCollection ) 055 //////////////////////////////////////////////////////////////////////// 056 { 057 this.repetition = repetition; 058 059 this.trialLength = trialLength; 060 061 this.stimuli = stimuli; 062 063 this.discreteEventCollection = discreteEventCollection; 064 } 065 066 //////////////////////////////////////////////////////////////////////// 067 //////////////////////////////////////////////////////////////////////// 068 069 public Collection<DiscreteEvent> getDiscreteEventCollection ( ) 070 //////////////////////////////////////////////////////////////////////// 071 { 072 return discreteEventCollection; 073 } 074 075 //////////////////////////////////////////////////////////////////////// 076 //////////////////////////////////////////////////////////////////////// 077 078 @Override 079 public String toString ( ) 080 //////////////////////////////////////////////////////////////////////// 081 { 082 return new String ( 083 "Subexp trialLength:" 084 + trialLength 085 + " #Trials:" 086 + repetition ); 087 } 088 089 //////////////////////////////////////////////////////////////////////// 090 //////////////////////////////////////////////////////////////////////// 091 }