2
$\begingroup$

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.

enter image description here

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?

Thanks in advance.

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?

1 Answers 1

3

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).

  • 0
    @n$p$inti: 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.2012-03-06