Exemplo n.º 1
0
class CrisMethodByMethodMatrix(pypeline.Filter):
    def __init__(self, metrics_with_weights):
        pypeline.Filter.__init__(self)
        self.weights = [item[1] for item in metrics_with_weights]
        self.metrics = [item[0] for item in metrics_with_weights]
        self.method_matrix_builder = MethodMatrix(self.metrics, self.weights)

    def build_method_matrix(self, class_wrapper):
        matrix = self.method_matrix_builder.build_matrix(class_wrapper)
        logging.warning("CrisMethodByMethodMatrix::" +
                        "build_method_matrix:\n" + print_matrix(matrix.matrix))
        return matrix

    def filter_process(self, data):
        matrices = [self.build_method_matrix(item) for item in data]
        for mat in matrices:
            logging.warning("CrisMethodByMethodMatrix::" + "matrix:\n" +
                            print_matrix(mat.matrix))
        return matrices
Exemplo n.º 2
0
class CrisMethodByMethodMatrix(pypeline.Filter):
    def __init__(self, metrics_with_weights):
        pypeline.Filter.__init__(self)
        self.weights = [item[1] for item in metrics_with_weights]
        self.metrics = [item[0] for item in metrics_with_weights]
        self.method_matrix_builder = MethodMatrix(self.metrics, self.weights)

    def build_method_matrix(self, class_wrapper):
        matrix = self.method_matrix_builder.build_matrix(class_wrapper)
        logging.warning("CrisMethodByMethodMatrix::" +
            "build_method_matrix:\n" + print_matrix(matrix.matrix))
        return matrix

    def filter_process(self, data):
        matrices = [self.build_method_matrix(item)
            for item in data]
        for mat in matrices:
            logging.warning("CrisMethodByMethodMatrix::" +
                "matrix:\n" + print_matrix(mat.matrix))
        return matrices
Exemplo n.º 3
0
 def __init__(self, metrics_with_weights):
     pypeline.Filter.__init__(self)
     self.weights = [item[1] for item in metrics_with_weights]
     self.metrics = [item[0] for item in metrics_with_weights]
     self.method_matrix_builder = MethodMatrix(self.metrics, self.weights)
Exemplo n.º 4
0
 def __init__(self, metrics_with_weights):
     pypeline.Filter.__init__(self)
     self.weights = [item[1] for item in metrics_with_weights]
     self.metrics = [item[0] for item in metrics_with_weights]
     self.method_matrix_builder = MethodMatrix(self.metrics, self.weights)