Skip to content
Snippets Groups Projects
Commit e00fe905 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Terminate R^d vectors declarations and affectation

One can now write
``
R^3 u = (1, 2, 3);
R^3 v = u;

R^3 w = 0; // One cannot give another scalar value: just the constant value 0
           // that is `R^3 w = 1-1;` is an error!

w += u;    // w and u belong to the same space R^d (with d=3 here)

v *= 2.5-1;// the right hand side is a scalar expression that can be naturally
           // cast to an R

v -= u;
``
These constructions are allowed for small vectors: valid types are `R^1`, `R^2`
and `R^3`.

Remark: tuples are only allowed in initialization:
``
R^2 v = (0,1); // ok

R^2 w ;
w = (2,3);     // ok

w += (1,4);    // forbidden
``
parent ac9400d4
No related branches found
No related tags found
1 merge request!37Feature/language
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment