def test_getters(self):
    confInt          = .95
    netKCalculations = [
      [{"distanceBand": 0.0, "count": 0}, {"distanceBand": 2.0, "count": 12}, {"distanceBand": 4.0, "count": 20}], 
      [{"distanceBand": 0.0, "count": 0}, {"distanceBand": 2.0, "count": 6}, {"distanceBand": 4.0, "count": 18}], 
      [{"distanceBand": 0.0, "count": 0}, {"distanceBand": 2.0, "count": 12}, {"distanceBand": 4.0, "count": 20}], 
      [{"distanceBand": 0.0, "count": 0}, {"distanceBand": 2.0, "count": 10}, {"distanceBand": 4.0, "count": 20}]]

    netKAn = NetworkKAnalysis(confInt, netKCalculations)

    self.assertEqual(netKAn.getConfidenceInterval(), .95)
    self.assertEqual(netKAn.getNumberOfBands(), 3)
    self.assertEqual(netKAn.getNumberOfPermutations(), 3)
    self.assertEqual(netKAn.getEnvelopeSize(), 3)
Beispiel #2
0
    def test_getters(self):
        confInt = .95
        netKCalculations = [[{
            "distanceBand": 0.0,
            "count": 0
        }, {
            "distanceBand": 2.0,
            "count": 12
        }, {
            "distanceBand": 4.0,
            "count": 20
        }],
                            [{
                                "distanceBand": 0.0,
                                "count": 0
                            }, {
                                "distanceBand": 2.0,
                                "count": 6
                            }, {
                                "distanceBand": 4.0,
                                "count": 18
                            }],
                            [{
                                "distanceBand": 0.0,
                                "count": 0
                            }, {
                                "distanceBand": 2.0,
                                "count": 12
                            }, {
                                "distanceBand": 4.0,
                                "count": 20
                            }],
                            [{
                                "distanceBand": 0.0,
                                "count": 0
                            }, {
                                "distanceBand": 2.0,
                                "count": 10
                            }, {
                                "distanceBand": 4.0,
                                "count": 20
                            }]]

        netKAn = NetworkKAnalysis(confInt, netKCalculations)

        self.assertEqual(netKAn.getConfidenceInterval(), .95)
        self.assertEqual(netKAn.getNumberOfBands(), 3)
        self.assertEqual(netKAn.getNumberOfPermutations(), 3)
        self.assertEqual(netKAn.getEnvelopeSize(), 3)