public SimClustersInMemory()

in src/main/java/com/twitter/sbf/core/SimClustersInMemory.java [145:196]


  public SimClustersInMemory(
      BipartiteGraph g,
      int k,
      AlgorithmConfig mhParameters,
      int thresholdForStepThree,
      double thresholdForStepOne,
      boolean retainTopK,
      int topKParameter,
      PrintWriter diagnosticsWriter,
      boolean normalizeColumnsRight,
      boolean normalizeRowsLeft,
      boolean squareWeights,
      String initType,
      boolean applyStepFour,
      double thresholdForStepFour,
      boolean applyLogTransform
  ) {
    //Perform checks on parameters
    if (k != mhParameters.k) {
      throw new RuntimeException(
          String.format(
              "k = %d does not match the k = %d in the AlgorithmConfig object ",
              k, mhParameters.k
          )
      );
    } else if (g.isWeighted()) {
      throw new RuntimeException(
          String.format(
              "Input bipartite graph is weighted -- weighted graphs not supported!"
          )
      );
    }
    this.g = g;
    this.k = k;
    this.mhParameters = mhParameters;
    this.thresholdForStepThree = thresholdForStepThree;
    this.thresholdForStepOne = thresholdForStepOne;
    this.retainTopK = retainTopK;
    if (retainTopK) {
      this.topKParameter = topKParameter;
    } else {
      this.topKParameter = this.g.getNumRightVertices();
    }
    this.diagnosticsWriter = diagnosticsWriter;
    this.squareWeights = squareWeights;
    this.normalizeColumnsRight = normalizeColumnsRight;
    this.normalizeRowsLeft = normalizeRowsLeft;
    this.initType = initType;
    this.applyStepFour = applyStepFour;
    this.thresholdForStepFour = thresholdForStepFour;
    this.applyLogTransform = applyLogTransform;
  }