/** constructor taking a dimension */ public DistanceMatrix(TaxonList taxa) { super(); this.taxa = taxa; dimension = taxa.getTaxonCount(); distances = new double[dimension][dimension]; distancesKnown = true; }
public int sizeOfIntersection(TaxonList tl1, TaxonList tl2) { int nIn = 0; for (int j = 0; j < tl1.getTaxonCount(); ++j) { if (tl2.getTaxonIndex(tl1.getTaxon(j)) >= 0) { ++nIn; } } return nIn; }
public boolean contained(TaxonList taxons, TaxonList taxons1) { return sizeOfIntersection(taxons, taxons1) == taxons.getTaxonCount(); }