5
$\begingroup$

I am looking for a symbol to represent the operation of taking unique values from a vector. So, say the symbol was $\theta$:

$v = [0, 0, 0, 1, 1, 1, 3, 1, 2, 0]$

$\theta(v) = [0, 1, 3, 2]$

Or is this something that just isn't defined?

Thanks

EDIT

Thanks all for your help here. Your answers and comments have led me to realise that doing this operation on a vector is not really what I want to do; using a set makes much more sense logically.

(Background: I have many coordinates $\boldsymbol{p}_i = [x_i, y_i, z_i]$ in 3D space, which I then perform a rounding function on so they are equally sampled. However, there will be many duplicates points at each new coordinate, so I remove the duplicated $\boldsymbol{p}$ points to get the final set of points. So it makes sense to define a set $\boldsymbol{P} = \{\boldsymbol{p}_1, ... \boldsymbol{p}_i, \cdot \boldsymbol{p}_n\}$).

  • 0
    I don't know of any universal notation for this kind of operation, so you'll probably have to define $\theta$ yourself (like you just did). At least $\theta$ is linear, so it'll have nice properties.2010-12-20
  • 4
    @Gunnar Magnusson: Linearity does not make sense here, because we are dealing with integer vectors. Also, $\theta$ is not additive: while $[0,1]$ is mapped to $[0,1]$ and $[1,0]$ is mapped to $[1,0]$, $[0,1]+[1,0]=[1,1]$ is mapped to $[1]$.2010-12-20
  • 1
    @Rasmus How do you know that the OP is only interested in integer vectors? This restriction doesn't appear anywhere in the post.2010-12-20
  • 0
    @Rasmus: So is $\theta$ supposed to return the set of coordinates of a vector with some ordering? I thought the OP just wanted to pick out certain coordinates, like he does in $\theta$ where he picks (for example) the 1st, 4th, 7th and 9th ones. Then the function is linear from $\mathbb R^{10}$ to $\mathbb R^4$.2010-12-20
  • 0
    @Alex Bartel: I deduced this from the fact that the OP uses only integers as coordinates. That's of course not a well-founded logical argument, I admit. ;)2010-12-20
  • 0
    @Gunnar Magnusson: I do not think that the OP wants to consider the usual coordinate projection onto a coordinate subspace.2010-12-20

2 Answers 2

7

A common way to express that you are throwing away duplicates is to translate a sequence into a set. A set is commonly understood as an unordered collection of distinct objects. It is usually denoted using curly braces. So you could write $\theta(v) = \{v_i\}_{i\in\{1,\ldots,n\}}$, where $v=[v_1,\ldots,v_n]$.

  • 0
    I think the value of $\theta$ is supposed to be a vector again, not just a set. That is, I think the OP wants to endow the set of entries of the input vector with the total order given by "appearing earlier".2010-12-20
  • 0
    Aha. So am I right in thinking that taking the unique elements of a set S would always return S?2010-12-20
  • 0
    @Bill Yes, that's right.2010-12-20
2

There is no standard notation for the set of coefficients of a vector. Indeed, there's not even any standard notation for the set of coefficients of a polynomial (which would be useful when taking the content, i.e. the gcd / ideal generated by the coefficients).