What do the double vertical lines around $\vec i$ and $\vec j$ in this equation actually mean?
$$ sim(i,j) = cos(\vec i, \vec j) = \frac{\vec i \cdot \vec j}{\lVert \vec i\rVert^2 * \lVert\vec j\rVert^2} $$
What do the double vertical lines around $\vec i$ and $\vec j$ in this equation actually mean?
$$ sim(i,j) = cos(\vec i, \vec j) = \frac{\vec i \cdot \vec j}{\lVert \vec i\rVert^2 * \lVert\vec j\rVert^2} $$
It signifies the "norm" of the vector. There are many types of norms you can define, which all follow basic rules. Based on what you posted, they are using it to refer to the "Euclidean Norm" which is, as the comments suggest, the "length" of the vectors here. Single lines always means the Euclidean Norm (from my experience) but double lines can mean any norm.
When discussing real or complex vectors, you often also have real or complex numbers in the conversation. If these things are represented symbolically, every little thing you can do to remind the reader which symbols represent vectors and which symbols represent numbers is good. For example, the meaning of $\left|a\right|\left|v\right|$ is not as clear as that of $\left|a\right|\left|\vec{v}\right|$, and it's even more clear to write $\left|a\right|\left\|\vec{v}\right\|$.
Incidentally, \left\|...\right\| looks better than \mid\mid...\mid\mid. Compare $\left\|\vec{v}\right\|$ to $\mid\mid\vec{v}\mid\mid$.
\mid" but rather\|(or a double||if anything else). The command\midis a separator; whereas|and\|are not. The difference is in the spacing. – Asaf Karagila Apr 06 '14 at 18:14\lVert+\rVert.\|has the problem that it's unclear whether TeX should treat it as amathopenormathclose. – kahen Apr 06 '14 at 18:30