public void write(final PrintStream stream){
  stream.print("time\ttime_s");
  for (  String actType : dataPerActType.keySet()) {
    stream.print("\thello_" + actType + "\tgoodbye_"+ actType+ "\tpairs_together_"+ actType);
  }
  stream.print("\n");
  int[] pairsTogetherPerType=new int[dataPerActType.size()];
  for (int i=0; i < nofBins; i++) {
    int mode=0;
    for (    DataFrame data : dataPerActType.values()) {
      pairsTogetherPerType[mode]=pairsTogetherPerType[mode] + data.countsHello[i] - data.countsGoodbye[i];
      stream.print(Time.writeTime(i * this.binSize) + "\t" + i * this.binSize);
      stream.print("\t" + data.countsHello[i] + "\t"+ data.countsGoodbye[i]+ "\t"+ pairsTogetherPerType);
      mode++;
    }
    stream.print("\n");
  }
}

public void write ( final PrintStream stream ) { stream . print ( "time\ttime_s" ) ; for ( String actType : dataPerActType . keySet ( ) ) { stream . print ( "\thello_" + actType + "\tgoodbye_" + actType + "\tpairs_together_" + actType ) ; } stream . print ( "\n" ) ; int [ ] pairsTogetherPerType = new int [ dataPerActType . size ( ) ] ; for ( int i = 0 ; i < nofBins ; i ++ ) { int mode = 0 ; for ( DataFrame data : dataPerActType . values ( ) ) { pairsTogetherPerType [ mode ] = pairsTogetherPerType [ mode ] + data . countsHello [ i ] - data . countsGoodbye [ i ] ; stream . print ( Time . writeTime ( i * this . binSize ) + "\t" + i * this . binSize ) ; stream . print ( "\t" + data . countsHello [ i ] + "\t" + data . countsGoodbye [ i ] + "\t" + pairsTogetherPerType ) ; mode ++ ; } stream . print ( "\n" ) ; } }
writes the gathered data tab - separated into a text stream .
