예제 #1
0
  /*...............................................................................................................*/
  public void setTableAndTaxa(MesquiteTable table, Taxa taxa) {
    // if (this.data !=null)
    //	this.data.removeListener(this);
    if (taxa != this.taxa) observedStates = null;
    this.taxa = taxa;
    matrixSourceTask.initialize(taxa);

    this.table = table;

    doCalcs();
  }
예제 #2
0
  public void doCalcs() {
    if (bits != null) bits.clearAllBits();
    if (taxa == null) return;
    if (bits == null) bits = new Bits(taxa.getNumTaxa());
    else bits.resetSize(taxa.getNumTaxa());
    if (observedStates == null) {
      tInfo = null;
      observedStates = matrixSourceTask.getCurrentMatrix(taxa);
      if (observedStates != null) {
        captureCharacterDataFromObservedStates();

        if (data != null) tInfo = data.getTaxaInfo(true);
      }
    }
    if (observedStates == null) return;
    for (int it = 0; it < taxa.getNumTaxa(); it++) {
      if (hasData(it)) bits.setBit(it);
    }
  }