CH and DB Indexes for LS-distance-like function

Input: set 𝒜 ⊂ (ℝ^n), partition Π of the set 𝒜 ⊂ (ℝ^n), centers cen ∈ (ℝ^kn);
Output: CH and DB index;
Submodules: Fmin[]

Indexes[A_,PI_,cen_]:=Module[{k=Length[cen],m=Length[A],F,G,KK,sigma2,CH,DB},
F=Fmin[A,cen,2];
G=Sum[Norm[Mean[A]-A[[i]]]^2,{i,m}]-F;
CH=(G/(k-1))/(F/(m-k)); 
KK=Table[j,{j,k}];
sigma2=Table[Sum[Norm[cen[[j]]-PI[[j,s]]]^2,{s,Length[PI[[j]]]}]/Length[PI[[j]]],{j,k}];
DB=Sum[Max[Table[(Sqrt[sigma2[[j]]]+Sqrt[sigma2[[s]]])/Norm[cen[[j]]-cen[[s]]],{s,Complement[KK,{j}]}]],{j,k}]/k;
{CH,DB}//N
]