How to define a finite topological space? I want to develop a simple way to define topologies on finite sets
$X=\{1,2,\dots,n\}$ for computational experiments. 

Does any function $c:X\to \mathcal P(X)$, such that $x\in c(x)$,
  define a closure operator on $X$?

The idea is that $c$ should define a closure operator by
$$\mathrm{cl}(\{x_1,\cdots,x_m\})=\overline{\{x_1,\cdots,x_m\}}=\bigcup_{k=1}^{m} c(x_k)$$

Starting with an arbitrary function $c:X\to\mathcal P(X)$ such that $\forall x\in X:x\in c(x)$, this should be an algorithm to transform $c$ to a function that defines a closure operator, due to the accepted answer:
$0:\quad$ $\mathrm{ready}\leftarrow\mathrm{true}$
$1:\quad$ $i\leftarrow 1$
$2:\quad$ $j\leftarrow 1$
$3:\quad$ if $i\in c(j)$ and $c(i)\cap c(j)\neq c(i)$ then $c(j)\leftarrow c(j)\cup c(i)$ ; $\mathrm{ready}\leftarrow\mathrm{false}$
$4:\quad$ $j\leftarrow j+1$
$5:\quad$ if $j\leq n$ then goto $3$
$6:\quad$ $i\leftarrow i+1$
$7:\quad$ if $i\leq n$ then goto $2$
$8:\quad$ if not ready then goto $0$  
