# What do these notations actually mean?

I apologize if this question sounds weird, but I have come across this function (which I am trying to replicate using C# code), which has left me a bit confused.

The way I am understanding, is that this function states that the total amount of elements in set Sj will be divided by the sum of the two vectors (since pc and coh(s) return vectors, each having 2 points). From what I managed to find, the || denote the absolute value of the addition (I could be wrong though). The function will then return the maximum value for that calculation.

What is confusing me is the fact that I am dividing an integer by the sum of two vectors and to my (limited) knowledge, that cannot be done.

Can anyone offer some explanation for this?

EDIT: After some more digging, I found this:

The length or magnitude or norm of the vector a is denoted by ||a|| or, less commonly, |a|, which is not to be confused with the absolute value (a scalar "norm").

So I take it that now I am deviding an integer by an float. Is my assumption correct or did I get something wrong?

-

Here is how you should read it $$\max_{s \in S_j} \frac{|S_j|}{|| p_c + \Delta_{coh}(s) ||} = \max \frac {\mbox{the size of the set }S_j}{\mbox{the magnitude of the vector sum } p_c + \Delta_{coh}(s)}$$

Now note that the magnitude of the vector $(v_0, v_1) = p_c + \Delta_{coh}(s) = \sqrt{v_0^2 + v_1^2}$. I'm assuming 2D euclidean space (for example look here).

The max operator requires you to find the maximum value of the fraction for all different values of $s$.

And you are right. You're dividing integer (that is: $|S_j|$) by a real number, or float, (that is: length of $p_c + \Delta_{coh}(s)$).

Edit: programming wise, if i is int and f is float, then you can compute i/f by first casting i into a float, e.g. ((float) i)/f. The result will be a float. Some compilers will do that for you (implicit coercion).

-
Thanks a lot for the information. When you say the magnitude of vector (V0, V1) =... what exactly are V0 and V1? Are they the points making up the vector? – npinti Mar 6 '12 at 15:47
@J.D.: It's not a matter of "some compilers"; the C# language definition requires that i/f implicitly converts the int to a float. See ECMA-334, sections 13.1.2, 14.2.4, 14.7.2 (and 14.2.6.2 for the non-normative TLDR version). But the OP should almost certainly use double rather than float` here. – Henning Makholm Mar 6 '12 at 16:20
@npinti: A vector does not consists of "points", but of "elements" or "coordinates". As a whole, the vector can be thought of as defining one point in 2-dimensional space. – Henning Makholm Mar 6 '12 at 16:24