- HasNan
- Transpose
- TransposeConjugate
- TriL
- TriU
- Diag
- Row
- Col
- Copy
- Concat
- Compare
- CompareByDigits
- CompareEqual
- Flat
- Clip
- Reshape
- Resize
- Set
- SwapRows
- SwapCols
- Split
- Hsplit
- Vsplit
- ArgSort
- Sort
Set
Sets the value for a vector element by the specified index.
bool vector::Set(
|
Parameters
index
[in] Index of the element the value needs to be set for.
value
[in] Value.
Return Value
Returns true if successful, otherwise - false.
Note
The Set method does the same thing as assigning a value using square brackets, namely: vector[index]=value. The method has been added to simplify transferring a code from languages where this type of notation is used. The example below shows both options for filling the vector with values by the specified index.
Example:
void OnStart()
|