
org.rcsb.mmtf.spark.data.SegmentClusters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mmtf-spark Show documentation
Show all versions of mmtf-spark Show documentation
MMTF Spark is a series of libraries and functions for using MMTF
with Spark.
package org.rcsb.mmtf.spark.data;
import org.apache.spark.api.java.JavaPairRDD;
/**
* A class to consider clusters of segmenets.
* @author Anthony Bradley
*
*/
public class SegmentClusters {
/** The internal RDD data. */
private JavaPairRDD> fragClustRdd;
/**
* Constructor of FragmentClusters. The string is the Key of the cluster.
* List of Segments describes the cluster.
* @param inputRDD the input {@link JavaPairRDD} data.
*/
public SegmentClusters(JavaPairRDD> inputRDD) {
fragClustRdd = inputRDD;
}
/**
* Get the number of clusters available.
* @return the number of clusters
*/
public Long size(){
return fragClustRdd.count();
}
/**
* Get the {@link JavaPairRDD} for this class.
* @return the {@link JavaPairRDD}.
*/
public JavaPairRDD> getJavaRdd() {
return this.fragClustRdd;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy