/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package CommonFunctions;

import database.CoreDatabase;
import structures.SuperNodeObject;
import java.util.Random;

/**
 * Randomly selects a supernode from the supernode vector stored in the CoreDatabase.
 */
public class RandomSelectSuperNode {

    public static SuperNodeObject RandomSelect() {
        Random generator = new Random();
        int randomIndex = generator.nextInt(CoreDatabase.superNodes.size());
        return (SuperNodeObject)CoreDatabase.superNodes.elementAt(randomIndex);
    }
}
