  Let $(X,T)$ be a topological dynamical system with metric $d$. We define a
new function $\overline{F}(x,y)=\limsup\limits_{n \to +\infty}
\inf\limits_{\sigma \in S_n} \frac 1n \sum\limits_{k=1}^n d(T^k x,T^{\sigma(k)}
y)$ by using permutation group $S_n$. It's shown $F(x,y)=\lim\limits_{n \to
+\infty} \inf\limits_{\sigma \in S_n} \frac 1n \sum\limits_{k=1}^n d(T^k
x,T^{\sigma(k)} y)$ exists when $x,y \in X$ are generic points. Applying this
function, we prove $(X,T)$ is uniquely ergodic if and only if
$\overline{F}(x,y)=0$ for any $x,y \in X$. The characterizations of ergodic
measures and physical measures by $\overline{F}(x,y)$ are given. We introduce
the notion of weak mean equicontinuity and prove that $(X,T)$ is weak mean
equicontinuous if and only if the time averages $f^{*}(x)=\lim\limits_{n \to
+\infty}\frac 1n \sum\limits_{k=1}^n f(T^k x)$ exist and are continuous for all
$f \in C(X)$.
