Package cross.reputation.model

Examples of cross.reputation.model.SqrtNumericTransformer


    }
  }
 
  public SqrtNumericTransformer getSqrtNumericTransformer(
      Model model, Resource resource) throws Exception {
    SqrtNumericTransformer sqrtNum = (SqrtNumericTransformer)
      getResourceFromCache(resource, SqrtNumericTransformer.class);
    if(sqrtNum != null) {     
      return sqrtNum;
    }
    MetricTransformerInstances metTraInstance =
      getMetricTransformer(model, resource);
    sqrtNum = new SqrtNumericTransformer(
          metTraInstance.sourceMetric, metTraInstance.destinationMetric,
          metTraInstance.correlationBetweenMetrics);
    sqrtNum.setResource(resource);
    addResourceInstanceToCache(resource, sqrtNum);
    sqrtNum.setDescription(metTraInstance.description);
    return sqrtNum;
  }
View Full Code Here


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

    //Configure all metric transformers that we need
    //GlobalModel.addMetricTransformer(new LogaritmicNumericTransformer(GlobalModel.getMetrics().
    //    get("stackOverflowMetric"),GlobalModel.getMetrics().get("semanticWikiMetric"),1.0));
    //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().
View Full Code Here

TOP

Related Classes of cross.reputation.model.SqrtNumericTransformer

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.