create a vector of symbolic scalars
v: Vec() v: Vec( a ) v: Vec( b, n )
vector or matrix of symbolic scalars
symbolic scalar, string
non-negative integer
vector of symbolic scalars
Returns an empty vector.
Returns a vector, which is either a copy of a vector a or contains the concatenated rows of a matrix a.
Returns a vector with n elemtents. For a symbolic scalar b all elements are set to the value of b. For a string b the elements are different symbols named "b" appended by an index "1",..,"n".
Other symbolic object types (scalar, set, or matrix) are created using Sym(..), Set(..), or Mat(..).
// create an empty symbolic vector a = %(Vec()) // create a symbol x = %(Sym("x")) // add some elements to vector a a: int32(5) a: 1.23 a: x // create a copy of vector a b = %(Vec(a)) // create a vector c with elements x, x, x c = %(Vec(x,3)) // create a vector d with elements x1, x2, x3, x4 d = %(Vec("x",4)) // create a vector e from a (2,3)-matrix e = %(Vec(Mat("a",2,3))) // clean-up free(a); free(x); free(b); free(c); free(d); free(e) clear a x b c d e; | ![]() | ![]() |
SymEngine: C++ library for fast symbolic manipulation.