Objective functions

Input: partition Π={(Subscript[π, 1]),⃛,(Subscript[π, k])} of the set 𝒜 ⊂ (ℝ^n), (in case of Fmin[] only the set 𝒜), centers (Subscript[c, 1]),⃛,(Subscript[c, k]) ∈ (ℝ^n), parameter p = 1 or 2;
Output: objective function values: ℱ(Π), \[FormalCapitalF](c), or 𝒢(Π);
Submodules: d[]

FF[PI_,c_,p_:2]:=Module[{k=Length[c]},
Sum[Sum[d[PI[[j,s]],c[[j]],p],{s,Length[PI[[j]]]}],{j,k}]
]

Fmin[A_,c_,p_:2]:=Module[{m=Length[A],k=Length[c]},
Sum[Min[Table[d[A[[i]],c[[j]],p],{j,k}]],{i,m}]
]

G[PI_,c_]:=Module[{k=Length[c],cA},
cA=Mean[Flatten[Join[PI],1]];
Total[Table[Length[PI[[j]]]*d[cA,c[[j]],p],{j,Length[PI]}]]
]