Name
vector
- vector
operation
[arg arg
...] Create and manipulate vectors, that is, ordered sets of real numbers. BLT’s vectors are mor e ef ficient than standard Tcl lists and arrays for accessing and manipulating large sets of real numbers. The following operations are defined:
- vector
vecSpec
[vecSpec
...] [option value
...] Same as vector create.
- vector create
[
vecSpec
...] [option value
...] Create one or more new vectors according to
vecSpec
and the following options. The name of the last vector created is Returned. ThevecSpec
argument specifies the vector’s name and size according to these valid forms:- vecName
A vector named
vecName
with no components.vecName
(size
)A vector named
vecName
withsize
components, all initialized to 0.0 and with the index starting from 0.vecName
(first
:last
)A vector named
vecName
with components indexed fromfirst
tolast
, inclusive, all initialized to 0.0.
The following options are available to the create operation:
- -variable
varName
Name of a Tcl array to be associated with the vector. By default, the variable is the same as the vector name (this may change in a future release of BLT). Any existing array by this name is deleted. If
varName
is an empty string, then no variable will be mapped. See the "Accessing Vectors as Arrays" section for how this array variable can be used.- -command
cmdName
Name of a Tcl command to be mapped to the vector. A Tcl command by that name cannot already exist. If the command name is the empty string, then no command will be mapped ...
- vector
Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.