GraphEditorPlotSort.java

Go to the documentation of this file.
00001 package edu.rice.cs.hpc.viewer.graph;
00002 
00003 import java.io.IOException;
00004 
00005 import edu.rice.cs.hpc.data.experiment.metric.MetricRaw;
00006 import edu.rice.cs.hpc.data.experiment.scope.Scope;
00007 import edu.rice.cs.hpc.viewer.metric.ThreadLevelDataFile;
00008 import edu.rice.cs.hpc.viewer.metric.ThreadLevelDataManager;
00009 
00010 public class GraphEditorPlotSort extends GraphEditor {
00011 
00012     public static final String ID = "edu.rice.cs.hpc.viewer.graph.GraphEditorPlotSort";
00013 
00014 
00015     //@Override
00016     protected double[] getValuesX(ThreadLevelDataManager objDataManager, 
00017             Scope scope, MetricRaw metric) {
00018 
00019         double x_values[] = objDataManager.getProcessIDsDouble(metric.getID());
00020         double sequence_x[] = new double[x_values.length];
00021         for (int i=0; i<x_values.length; i++) {
00022             sequence_x[i] = (double) i;
00023         }
00024         return sequence_x;
00025     }
00026 
00027 
00028 
00029     //@Override
00030     protected double[] getValuesY(ThreadLevelDataManager objDataManager, 
00031             Scope scope, MetricRaw metric) throws IOException {
00032 
00033         double y_values[] = null;
00034         {
00035             y_values = objDataManager.getMetrics( metric, scope.getCCTIndex());
00036             
00037             java.util.Arrays.sort(y_values);
00038         }           
00039         return y_values;
00040     }
00041 
00042 
00043 
00044     //@Override
00045     protected String getXAxisTitle(ThreadLevelDataFile data) {
00046         return "Rank in Sorted Order";
00047     }
00048 
00049     
00050 
00051 }

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1