SamplingConstants.java
/*
* Copyright © 2014 - 2021 Leipzig University (Database Research Group)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gradoop.flink.model.impl.operators.sampling.common;
import org.gradoop.flink.model.impl.operators.sampling.PageRankSampling;
import org.gradoop.flink.model.impl.operators.sampling.RandomLimitedDegreeVertexSampling;
import org.gradoop.flink.model.impl.operators.sampling.RandomNonUniformVertexSampling;
import org.gradoop.flink.model.impl.operators.sampling.functions.AddPageRankScoresToVertexCrossFunction;
import org.gradoop.flink.model.impl.operators.sampling.functions.FilterVerticesWithDegreeOtherThanGiven;
import org.gradoop.flink.model.impl.operators.sampling.functions.PageRankResultVertexFilter;
import org.gradoop.flink.model.impl.operators.sampling.functions.VertexDegree;
/**
* Constants for all sampling algorithms.
*/
public class SamplingConstants {
/**
* Key of degree property, used by {@link RandomNonUniformVertexSampling},
* {@link RandomLimitedDegreeVertexSampling} and {@link FilterVerticesWithDegreeOtherThanGiven}
*/
public static final String DEGREE_PROPERTY_KEY = VertexDegree.BOTH.getName();
/**
* Key of in-degree property, used by {@link RandomNonUniformVertexSampling},
* {@link RandomLimitedDegreeVertexSampling} and {@link FilterVerticesWithDegreeOtherThanGiven}
*/
public static final String IN_DEGREE_PROPERTY_KEY = VertexDegree.IN.getName();
/**
* Key of out-degree property, used by {@link RandomNonUniformVertexSampling},
* {@link RandomLimitedDegreeVertexSampling} and {@link FilterVerticesWithDegreeOtherThanGiven}
*/
public static final String OUT_DEGREE_PROPERTY_KEY = VertexDegree.OUT.getName();
/**
* Key of a property generated by {@link RandomNonUniformVertexSampling}
*/
public static final String PROPERTY_KEY_MAX_DEGREE = "_maxDegree";
/**
* Key of the PageRankScore property used by {@link PageRankSampling} and
* {@link AddPageRankScoresToVertexCrossFunction}
*/
public static final String PAGE_RANK_SCORE_PROPERTY_KEY = "PageRankScore";
/**
* Key of the scaled_PageRankScore property used by {@link PageRankResultVertexFilter} and
* {@link AddPageRankScoresToVertexCrossFunction}
*/
public static final String SCALED_PAGE_RANK_SCORE_PROPERTY_KEY = "scaled_" +
PAGE_RANK_SCORE_PROPERTY_KEY;
/**
* Key of the min_PageRankScore property used by {@link AddPageRankScoresToVertexCrossFunction}
*/
public static final String MIN_PAGE_RANK_SCORE_PROPERTY_KEY = "min_" +
PAGE_RANK_SCORE_PROPERTY_KEY;
/**
* Key of the max_PageRankScore property used by {@link AddPageRankScoresToVertexCrossFunction}
*/
public static final String MAX_PAGE_RANK_SCORE_PROPERTY_KEY = "max_" +
PAGE_RANK_SCORE_PROPERTY_KEY;
/**
* Key of the sum_PageRankScore property used by {@link AddPageRankScoresToVertexCrossFunction}
*/
public static final String SUM_PAGE_RANK_SCORE_PROPERTY_KEY = "sum_" +
PAGE_RANK_SCORE_PROPERTY_KEY;
/**
* Property key used by multiple sampling algorithms
*/
public static final String PROPERTY_KEY_SAMPLED = "sampled";
/**
* Private constructor
*/
private SamplingConstants() { }
}