Exemplo n.º 1
0
  public boolean alterBlockOfCharacters(CharacterData data, int icStart, int icEnd) {
    if (data == null) return false;
    if (data instanceof MolecularData) {
      MolecularData mData = (MolecularData) data;
      mData.reverse(icStart, icEnd, true);
    } else {
      for (int it = 0; it < data.getNumTaxa(); it++)
        for (int i = 0; i <= (icEnd - icStart) / 2 && icStart + i < icEnd - i; i++) {
          data.tradeStatesBetweenCharacters(icStart + i, icEnd - i, it, true);
        }
    }

    return true;
  }
Exemplo n.º 2
0
 public Associable getTaxaInfo(CharacterData data, boolean makeIfNotPresent) {
   if (makeIfNotPresent && taxaInfo == null) {
     taxaInfo = new TaxaInfo(data.getNumTaxa(), data);
   }
   return taxaInfo;
 }