Replies if the bus network should be drawn with the
algorithm.

@return <code>true</code> if the algorithm may be used,
otherwise <code>false</code>
508215
@Pure
	public static BusLayerDrawerType getPreferredLineDrawAlgorithm() {
		final Preferences prefs = Preferences.userNodeForPackage(BusLayerConstants.class);
		if (prefs != null) {
			final String algo = prefs.get("DRAWING_ALGORITHM", null); //$NON-NLS-1$
			if (algo != null && algo.length() > 0) {
				try {
					return BusLayerDrawerType.valueOf(algo);
				} catch (Throwable exception) {
					//
				}
			}
		}
		return BusLayerDrawerType.OVERLAP;
	}
78947
private boolean mustContinue(BitSet potentialNode) {
        boolean result = true;
        boolean cancel = false;
        BitSet projG1 = projectG1(potentialNode);
        BitSet projG2 = projectG2(potentialNode);

        // if we reached the maximum number of
        // search iterations than do not continue
        if (getMaxIteration() != -1 && getNbIteration() >= getMaxIteration()) {
            return false;
        }

        // if constrains may no more be fulfilled then stop.
        if (!isContainedIn(sourceBitSet, projG1) || !isContainedIn(targetBitSet, projG2)) {
            return false;
        }

        // check if the solution potential is not included in an already
        // existing solution
        for (Iterator<BitSet> i = getSolutionList().iterator(); i.hasNext() && !cancel;) {
            BitSet sol = i.next();

            // if we want every 'mappings' do not stop
            if (isFindAllMap() && (projG1.equals(projectG1(sol)) || projG2.equals(projectG2(sol)))) {
                // do nothing
            } // if maxIterator is not possible to do better than an already existing solution than stop.
            else if (isContainedIn(projG1, projectG1(sol)) || isContainedIn(projG2, projectG2(sol))) {
                result = false;
                cancel = true;
            }
        }

        return result;
    }
980930
public boolean addBusItinerary(BusItinerary busItinerary) {
		if (busItinerary == null) {
			return false;
		}
		if (this.itineraries.indexOf(busItinerary) != -1) {
			return false;
		}
		if (!this.itineraries.add(busItinerary)) {
			return false;
		}
		final boolean isValidItinerary = busItinerary.isValidPrimitive();
		busItinerary.setEventFirable(isEventFirable());
		busItinerary.setContainer(this);
		if (isEventFirable()) {
			fireShapeChanged(new BusChangeEvent(this,
					BusChangeEventType.ITINERARY_ADDED,
					busItinerary,
					this.itineraries.size() - 1,
					"shape", //$NON-NLS-1$
					null,
					null));
			if (!isValidItinerary) {
				revalidate();
			} else {
				checkPrimitiveValidity();
			}
		}
		return true;
	}
635042
@Override
  protected boolean hasOverflow(N node) {
    if(node.isLeaf()) {
      return node.getNumEntries() == leafCapacity;
    }
    else {
      if(node.isSuperNode()) {// supernode capacity differs from normal
                              // capacity
        return node.getNumEntries() == node.getCapacity();
      }
      return node.getNumEntries() == dirCapacity;
    }
  }
971370
public boolean needsPaint ()
    {
        // compute our average dirty regions per tick
        if (_tick++ == 99) {
            _tick = 0;
            int dirty = IntListUtil.sum(_dirty);
            Arrays.fill(_dirty, 0);
            _dirtyPerTick = (float)dirty/100;
        }

        // regardless of whether or not we paint, we need to let our abstract media managers know
        // that we've gotten to the point of painting because they need to remain prepared to deal
        // with media changes that happen any time between the tick() and the paint() and thus need
        // to know when paint() happens
        _animmgr.willPaint();
        _spritemgr.willPaint();

        // if we have dirty regions, we need painting
        return _remgr.haveDirtyRegions();
    }
111877
final public Boolean checkRealOffset() {
    if ((tokenRealOffset == null) || !provideRealOffset) {
      return false;
    } else if (tokenOffset == null) {
      return true;
    } else if (tokenOffset.getStart() == tokenRealOffset.getStart()
        && tokenOffset.getEnd() == tokenRealOffset.getEnd()) {
      return false;
    } else {
      return true;
    }
  }
93731
static private boolean isInlineLimitPlanNodePossible(AbstractPlanNode pn) {
        if (pn instanceof OrderByPlanNode ||
            pn.getPlanNodeType() == PlanNodeType.AGGREGATE) {
            return true;
        }
        return false;
    }
387241
public boolean addBusLine(BusLine busLine) {
		if (busLine == null) {
			return false;
		}
		if (this.busLines.indexOf(busLine) != -1) {
			return false;
		}
		if (!this.busLines.add(busLine)) {
			return false;
		}
		final boolean isValidLine = busLine.isValidPrimitive();
		busLine.setEventFirable(isEventFirable());
		busLine.setContainer(this);
		if (isEventFirable()) {
			fireShapeChanged(new BusChangeEvent(this,
					BusChangeEventType.LINE_ADDED,
					busLine,
					this.busLines.size() - 1,
					"shape", //$NON-NLS-1$
					null,
					null));
			if (!isValidLine) {
				revalidate();
			} else {
				checkPrimitiveValidity();
			}
		}
		return true;
	}
100649
def check_solution(self) -> bool:
        
        if self.solution is None:
            raise AssertionError("You need to `run` this algorithm first")
        assert_map = create_bv_bitmap(*self.solution)
        return all([assert_map[k] == v for k, v in self.input_bitmap.items()])
907248
public boolean next() {
    if (combinedBuffer_ == null) { // initial setup
      combinedBuffer_ = sketch_.combinedBuffer_;
      num_ = sketch_.getBaseBufferCount();
    } else { // advance index within the current level
      i_++;
    }
    if (i_ < num_) {
      return true;
    }
    // go to the next non-empty level
    do {
      level_++;
      if (level_ > 0) {
        bits_ >>>= 1;
      }
      if (bits_ == 0L) {
        return false; // run out of levels
      }
      weight_ *= 2;
    } while ((bits_ & 1L) == 0L);
    i_ = 0;
    offset_ = (2 + level_) * sketch_.getK();
    num_ = sketch_.getK();
    return true;
  }
1152583
public boolean isOutputVertex() {

		if (this.forwardEdges.size() == 0) {
			return true;
		}

		final Iterator<ManagementGroupEdge> it = this.forwardEdges.iterator();
		while (it.hasNext()) {
			if (it.next().getTarget().getStageNumber() == this.getStageNumber()) {
				return false;
			}
		}

		return true;
	}
507218
@Override
	protected void checkPrimitiveValidity() {
		BusPrimitiveInvalidity invalidityReason = null;
		if (this.busStops.isEmpty()) {
			invalidityReason = new BusPrimitiveInvalidity(
					BusPrimitiveInvalidityType.NO_STOP_IN_HUB,
					null);
		} else {
			final Iterator<BusStop> iterator = this.busStops.iterator();
			while (iterator.hasNext() && invalidityReason == null) {
				final BusStop stop = iterator.next();
				if (!stop.isValidPrimitive()) {
					invalidityReason = new BusPrimitiveInvalidity(
							BusPrimitiveInvalidityType.INVALID_LINKED_STOP,
							stop.getName());
				} else {
					final BusNetwork bn = stop.getBusNetwork();
					if (bn == null || bn != getBusNetwork()) {
						invalidityReason = new BusPrimitiveInvalidity(
								BusPrimitiveInvalidityType.NOT_IN_SAME_NETWORK,
								null);
					}
				}
			}
		}
		setPrimitiveValidity(invalidityReason);
	}
743967
public boolean isRaw() {
        if (this.typeParameters.length == 0) {
            return true;
        }
        for (int i = 0, n = this.typeParameters.length; i < n; i++) {
            if (!this.typeParameters[i].equals(WildcardTypeParameter.UNKNOWN)) {
                return false;
            }
        }
        return true;
    }
830452
public boolean hasDSLSentences() {

        if (this.lhs != null) {
            for (IPattern pattern : this.lhs) {
                if (pattern instanceof DSLSentence) {
                    return true;
                }
            }
        }

        if (this.rhs != null) {
            for (IAction action : this.rhs) {
                if (action instanceof DSLSentence) {
                    return true;
                }
            }
        }

        return false;
    }
585093
public boolean hasFullRank() {
		// if (R == null) {
		// R = new SparseCCDoubleMatrix2D(N.U);
		// if (rcMatrix) {
		// R = ((SparseCCDoubleMatrix2D) R).getRowCompressed();
		// }
		//
		// }
		int mn = Math.min(m, n);
		double mng = Math.sqrt(m * n);
		// double threshold = ALG.property().tolerance();
		double threshold = mng * Utils.getDoubleMachineEpsilon();
		for (int j = 0; j < mn; j++) {
			// if (R.getQuick(j, j) == 0){
			double rjj = getQuick(N.U, j, j);
			// log.debug("r(" + j + "," + j + "): " + rjj);
			// if (rjj < Utils.getDoubleMachineEpsilon()) {
			// return false;
			// }
			if (rjj < threshold) {
				return false;
			}
		}
		return true;
	}
652295
@Override
	@Pure
	public BusNetwork getBusNetwork() {
		final BusItinerary itinerary = getContainer();
		if (itinerary != null) {
			return itinerary.getBusNetwork();
		}
		return null;
	}
553313
@Pure
	public Iterator<BusStop> busStopIterator() {
		return Iterators.unmodifiableIterator(
				Iterators.concat(this.validBusStops.iterator(), this.invalidBusStops.iterator()));
	}