All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.rcsb.mmtf.spark.data.SegmentClusters Maven / Gradle / Ivy

Go to download

MMTF Spark is a series of libraries and functions for using MMTF with Spark.

There is a newer version: 0.0.8
Show newest version
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