コード例 #1
0
ファイル: SegregationBlock.java プロジェクト: ppflrs/rtg-core
 /** @param family family info */
 public SegregationBlock(final FamilyGt family) {
   mSeq = family.seq();
   mStart = family.posn();
   mEnd = family.posn();
   mPatterns = family.pattern();
   mIsXlike = family.isXLike();
   assert integrity();
 }
コード例 #2
0
ファイル: SegregationBlock.java プロジェクト: ppflrs/rtg-core
 /**
  * Extend the block if it can be done and keep consistent phasing. Update the block phasing
  * pattern if successful.
  *
  * @param family containing a set of calls.
  * @return true iff the block was successfully extended.
  */
 boolean extend(final FamilyGt family) {
   final int length = family.length();
   assert length == mPatterns.length();
   assert family.posn() > mEnd;
   assert mSeq.equals(family.seq());
   final PatternArray pattern = family.pattern();
   for (int f = 0; f < Pattern.NUMBER_FLIPS; f++) {
     final PatternArray pat = mPatterns.flipIntersect(pattern, f);
     if (pat != null) {
       mPatterns = pat;
       mEnd = family.posn();
       mCount++;
       return true;
     }
   }
   return false;
 }