Package cross.reputation.model

Examples of cross.reputation.model.ExponentialNumericTransformer


        destinationInstance, correlationsInstance, descriptionInstance);
  }
 
  public ExponentialNumericTransformer getExponentialNumericTransformer(
      Model model, Resource resource) throws Exception {
    ExponentialNumericTransformer expNum = (ExponentialNumericTransformer)
      getResourceFromCache(resource, ExponentialNumericTransformer.class);
    if(expNum != null) {     
      return expNum;
    }   
    MetricTransformerInstances metTraInstance =
      getMetricTransformer(model, resource);
    Double baseInstance;
    try {
      baseInstance = getBaseObject(model, resource);
    } catch(DiscardException e) {
      return null;
   
    if(baseInstance == null) {
      expNum = new ExponentialNumericTransformer(
          metTraInstance.sourceMetric, metTraInstance.destinationMetric,
          metTraInstance.correlationBetweenMetrics);     
    } else {
      expNum = new ExponentialNumericTransformer(
          metTraInstance.sourceMetric, metTraInstance.destinationMetric,
          metTraInstance.correlationBetweenMetrics, baseInstance);
    }
    expNum.setResource(resource);
    addResourceInstanceToCache(resource, expNum);
    expNum.setDescription(metTraInstance.description);
    return expNum;
  }
View Full Code Here


        System.out.println("The database contains subjects" +
            " of type ExponentialNumericTransformer:");
        while (iters.hasNext()) {
            Resource resource = iters.nextResource();
            System.out.println("  " + resource.getLocalName());
            ExponentialNumericTransformer expNumInstance =
              getExponentialNumericTransformer(model,resource);
            System.out.println("     sourceMetric:" +
                expNumInstance.getSourceMetric());
            System.out.println("     destinationMetric:" +
                expNumInstance.getDestinationMetric());
            System.out.println("     correlationBetMetrics:" +
                expNumInstance.getCorrelationBetweenMetrics());
            System.out.println("     base:" +
                expNumInstance.getBase());
            System.out.println("     scale:" +
                expNumInstance.getScale());
        }
    } else {
        System.out.println("No simple String riNamespace+" +
            "ExponentialNumericTransformer were found in the database");
    }
View Full Code Here

    //GlobalModel.addMetricTransformer(new LogaritmicNumericTransformer(GlobalModel.getMetrics().
    //    get("serverFaultMetric"),GlobalModel.getMetrics().get("semanticWikiMetric"),1.0));
    GlobalModel.addMetricTransformer(new SqrtNumericTransformer(GlobalModel.getMetrics().
        get("stackOverflowMetric"),GlobalModel.getMetrics().get("semanticWikiMetric"),1.0));
    //Cube root = exponent of 0.333:
    GlobalModel.addMetricTransformer(new ExponentialNumericTransformer(GlobalModel.getMetrics().
        get("serverFaultMetric"),GlobalModel.getMetrics().get("semanticWikiMetric"),1.0,0.333));
    GlobalModel.addMetricTransformer(new LogaritmicNumericTransformer(GlobalModel.getMetrics().
        get("webAppsStackExchangeMetric"),GlobalModel.getMetrics().get("semanticWikiMetric"),1.0));
    GlobalModel.addMetricTransformer(new LogaritmicNumericTransformer(GlobalModel.getMetrics().
        get("questionsSecuritytubeMetric"),GlobalModel.getMetrics().get("semanticWikiMetric"),1.0));
View Full Code Here

TOP

Related Classes of cross.reputation.model.ExponentialNumericTransformer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.