@Override
  public @NotNull PermanentCommitsInfo<CommitId> getPermanentCommitsInfo() {
    return new PermanentCommitsInfo<>() {
      @Override
      public @NotNull CommitId getCommitId(int nodeId) {
        return myFunction.apply(nodeId);
      }

      @Override
      public long getTimestamp(int nodeId) {
        return myTimestampGetter.getTimestamp(nodeId);
      }

      @Override
      public int getNodeId(@NotNull CommitId commitId) {
        for (int id = 0; id < myLinearGraph.nodesCount(); id++) {
          if (myFunction.apply(id).equals(commitId)) {
            return id;
          }
        }
        return -1;
      }

      @Override
      public @NotNull Set<Integer> convertToNodeIds(@NotNull Collection<? extends CommitId> commitIds) {
        Set<Integer> result = new HashSet<>();
        for (int id = 0; id < myLinearGraph.nodesCount(); id++) {
          if (commitIds.contains(myFunction.apply(id))) {
            result.add(id);
          }
        }
        return result;
      }
    };
  }
@Override
  public @NotNull PermanentCommitsInfo<CommitId> getPermanentCommitsInfo()