Mahalanobis area index for optimal Mahalanobis partitions

(* 
Input: partition Π={(Subscript[π, 1]),⃛,(Subscript[π, k])} of the weighted set 𝒜 ⊂ (ℝ^n), centers (Subscript[c, 1]),⃛,(Subscript[c, k]) ∈ (ℝ^n), covariance matrices (∑_j)∈(ℝ^(n\[Cross]n)), j=1⃛k;
Output: MArea index for the partition Π;
Submodules:  none needed 
*)

Clear[MArea]
MArea[PI_,z_,Scov_]:=Module[{},
(*Sum[Det[Scov[[j]]]/Length[PI[[j]]],{j,Length[PI]}]*)
Sum[Sqrt[Det[Scov[[j]]]]/Total[PI[[j,All,1]]],{j,Length[PI]}]
]