isCenter property

bool get isCenter

Implementation

bool get isCenter => neighbors.fold(
      true,
      (previousValue, element) =>
          previousValue &&
          (degree > element.degree ||
              (degree == element.degree && element.prevVertex == this)),
    );