bool is_validated()

in cpp/src/graphar/graph_info.cc [556:589]


  bool is_validated() const noexcept {
    if (src_type_.empty() || edge_type_.empty() || dst_type_.empty() ||
        chunk_size_ <= 0 || src_chunk_size_ <= 0 || dst_chunk_size_ <= 0 ||
        prefix_.empty() || adjacent_lists_.empty()) {
      return false;
    }

    for (const auto& al : adjacent_lists_) {
      if (!al || !al->IsValidated()) {
        return false;
      }
    }

    std::unordered_set<std::string> check_property_unique_set;
    for (const auto& pg : property_groups_) {
      // check if property group is validated
      if (!pg || !pg->IsValidated()) {
        return false;
      }
      // check if property name is unique in all property groups
      for (const auto& p : pg->GetProperties()) {
        if (check_property_unique_set.find(p.name) !=
            check_property_unique_set.end()) {
          return false;
        } else {
          check_property_unique_set.insert(p.name);
        }
      }
    }
    if (adjacent_lists_.size() != adjacent_list_type_to_index_.size()) {
      return false;
    }
    return true;
  }