def mmphi(self):

        if self.phi is None:
            n,m = self.doe.shape
            distdict = {}

            #calculate the norm between each pair of points in the DOE
            # TODO: This norm takes up the majority of the computation time. It
            # should be converted to C or ShedSkin.
            arr = self.doe
            for i in range(n):
                for j in range(i+1, n):
                    nrm = norm(arr[i]-arr[j], ord=self.p)
                    distdict[nrm] = distdict.get(nrm, 0) + 1

            distinct_d = array(distdict.keys())

            #mutltiplicity array with a count of how many pairs of points have a given distance
            J = array(distdict.values())

            self.phi = sum(J*(distinct_d**(-self.q)))**(1.0/self.q)

        return self.phi
Returns the Morris-Mitchell sampling criterion for this Latin hypercube.
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/doegenerators/optlh.py/LHC_indivudal.mmphi