Skip to content
Mike Anderson edited this page Jul 24, 2013 · 3 revisions

Joined vectors are a powerful capability in Vectorz, that allow you to connect vectors together to make larger vectors.

    Vector v1=Vector.of(1,2);
    Vector v2=Vector.of(3,4);

    Vector joined=v1.join(v2);
    // this now contains a length 4 vector with the values 1,2,3,4

Joined vectors represent views over the original data. This means that:

  • No data copying is performed during the creation of the joined vector. This makes the join operations very efficient if you are using large vectors.
  • If you mutate the joined vector, it will modify the underlying vectors.
Clone this wiki locally