OSDN Git Service

Please enter the commit message for your changes. Lines starting
[eos/hostdependX86LINUX64.git] / util / X86LINUX64 / man / mann / vector.n
index 2da9d2a..55796dc 100644 (file)
@@ -80,7 +80,7 @@
 '\" .UL arg1 arg2
 '\"    Print arg1 underlined, then print arg2 normally.
 '\"
-'\" RCS: @(#) $Id: man.macros,v 1.3 2001/02/17 07:46:19 ghowlett Exp $
+'\" RCS: @(#) $Id: man.macros,v 1.1.1.1 2009/05/09 16:27:42 pcmacdon Exp $
 '\"
 '\"    # Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
 .if t .wh -1.3i ^B
@@ -259,12 +259,14 @@ Database Class:   \\fB\\$3\\fR
 .de UL
 \\$1\l'|0\(ul'\\$2
 ..
-.TH vector n 2.4 BLT "BLT Built-In Commands"
+.TH vector n 2.5 BLT "BLT Built-In Commands"
 .BS
 '\" Note:  do not modify the .SH NAME line immediately below!
 .SH NAME
 vector \-  Vector data type for Tcl
 .SH SYNOPSIS
+\fBvector configure \fIoption value ...\fR
+.sp
 \fBvector create \fIvecName \fR?\fIvecName\fR...? ?\fIswitches\fR? 
 .sp
 \fBvector destroy \fIvecName \fR?\fIvecName\fR...?
@@ -272,6 +274,8 @@ vector \-  Vector data type for Tcl
 \fBvector expr \fIexpression\fR
 .sp
 \fBvector names \fR?\fIpattern\fR...?
+.sp
+\fBvector op\fR \fIoperation vecName\fR ?\fIarg\fR?...
 .BE
 .SH DESCRIPTION
 The \fBvector\fR command creates a vector of floating point
@@ -322,7 +326,7 @@ The \fBvector\fR command tries to overcome these disadvantages while
 still retaining the ease of use of Tcl arrays.  The \fBvector\fR
 command creates both a new Tcl command and associate array which are
 linked to the vector components.  You can randomly access vector
-components though the elements of array.  Not have all indices are
+components though the elements of array.  Not all indices are
 generated for the array, so printing the array (using the \fBparray\fR
 procedure) does not print out all the component values.  You can use
 the Tcl command to access the array as a whole.  You can copy, append,
@@ -335,9 +339,9 @@ operation.
 # Create a new vector. 
 vector create y(50)
 .CE
-This creates a new vector named \f(CWy\fR.  It has fifty components, by
-default, initialized to \f(CW0.0\fR.  In addition, both a Tcl command
-and array variable, both named \f(CWy\fR, are created.  You can use
+This creates a new vector named \fBy\fR.  It has fifty components, by
+default, initialized to \fB0.0\fR.  In addition, both a Tcl command
+and array variable, both named \fBy\fR, are created.  You can use
 either the command or variable to query or modify components of the
 vector.
 .CS
@@ -345,10 +349,10 @@ vector.
 set y(0) 9.25
 puts "y has [y length] components"
 .CE
-The array \f(CWy\fR can be used to read or set individual components of
+The array \fBy\fR can be used to read or set individual components of
 the vector.  Vector components are indexed from zero.  The array index
 must be a number less than the number of components.  For example,
-it's an error if you try to set the 51st element of \f(CWy\fR.
+it's an error if you try to set the 51st element of \fBy\fR.
 .CS
 # This is an error. The vector only has 50 components.
 set y(50) 0.02
@@ -365,16 +369,16 @@ and/or last component of the vector.
 # Print out all the components of y 
 puts "y = $y(:)"
 .CE
-There are special non-numeric indices.  The index \f(CWend\fR, specifies
+There are special non-numeric indices.  The index \fBend\fR, specifies
 the last component of the vector.  It's an error to use this index if
-the vector is empty (length is zero).  The index \f(CW++end\fR can be
+the vector is empty (length is zero).  The index \fB++end\fR can be
 used to extend the vector by one component and initialize it to a specific 
 value.  You can't read from the array using this index, though.
 .CS
 # Extend the vector by one component.
 set y(++end) 0.02
 .CE
-The other special indices are \f(CWmin\fR and \f(CWmax\fR.  They return the
+The other special indices are \fBmin\fR and \fBmax\fR.  They return the
 current smallest and largest components of the vector.  
 .CS
 # Print the bounds of the vector
@@ -382,7 +386,7 @@ puts "min=$y(min) max=$y(max)"
 .CE
 To delete components from a vector, simply unset the corresponding
 array element. In the following example, the first component of
-\f(CWy\fR is deleted.  All the remaining components of \f(CWy\fR will be
+\fBy\fR is deleted.  All the remaining components of \fBy\fR will be
 moved down by one index as the length of the vector is reduced by
 one.
 .CS
@@ -396,7 +400,7 @@ The vector's Tcl command can also be used to query or set the vector.
 vector create x
 x set { 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0.16 0.18 0.20 }
 .CE
-Here we've created a vector \f(CWx\fR without a initial length specification.
+Here we've created a vector \fBx\fR without a initial length specification.
 In this case, the length is zero.  The \fBset\fR operation resets the vector,
 extending it and setting values for each new component.  
 .PP
@@ -408,7 +412,7 @@ puts "x = [x range 0 end]"
 .CE
 You can search for a particular value using the \fBsearch\fR
 operation.  It returns a list of indices of the components with the
-same value.  If no component has the same value, it returns \f(CW""\fR.
+same value.  If no component has the same value, it returns \fB""\fR.
 .CS
 # Find the index of the biggest component
 set indices [x search $x(max)]
@@ -428,7 +432,7 @@ y vectors.
 # Sort the data points
 x sort y
 .CE
-The vector \f(CWx\fR is sorted while the components of \f(CWy\fR are 
+The vector \fBx\fR is sorted while the components of \fBy\fR are 
 rearranged so that the original x,y coordinate pairs are retained.
 .PP
 The \fBexpr\fR operation lets you perform arithmetic on vectors.  
@@ -456,6 +460,10 @@ x notify never
        ...
 # Force notification now
 x notify now
+
+# Set Tcl callback for update of Tktable widget .t.
+x notify callback {.t conf -padx [.t cget -padx]; .t reread}
+
 .CE
 To delete a vector, use the \fBvector delete\fR command.  
 Both the vector and its corresponding Tcl command are destroyed.
@@ -463,6 +471,18 @@ Both the vector and its corresponding Tcl command are destroyed.
 # Remove vector x
 vector destroy x
 .CE
+The psuedo vector \fBlast\fR can be used at the end of an
+expression to implement running totals.
+During execution it resolves to the result from the previous
+vector element evaluation.
+.CS
+vector create A(10)
+vector create B(10)
+vector create S(10)
+vector create T(10)
+S expr A+B
+T expr S+last; # Running total
+.CE
 .SH SYNTAX
 Vectors are created using the \fBvector create\fR operation.  
 Th \fBcreate\fR operation can be invoked in one of three forms:
@@ -473,7 +493,12 @@ This creates a new vector \fIvecName\fR which initially has no components.
 \fBvector create \fIvecName\fR(\fIsize\fR)
 This second form creates a new vector which will contain \fIsize\fR
 number of components.  The components will be indexed starting from
-zero (0). The default value for the components is \f(CW0.0\fR.
+zero (0). The default value for the components is \fB0.0\fR.
+.TP
+\fBvector create \fIvecName\fR(\fIrows,columns\fR)
+This form allows creation of a matrix with the specified columns and
+\fIrows*columns\fR elements.
+See the \fImatrix\fR section for more details.
 .TP
 \fBvector create \fIvecName\fR(\fIfirst\fR:\fIlast\fR)
 The last form creates a new vector of indexed \fIfirst\fR through
@@ -487,7 +512,7 @@ or underscores.
 vector create 1abc
 .CE
 You can automatically generate vector names using the
-"\f(CW#auto\fR" vector name.  The \fBcreate\fR operation will generate a 
+"\fB#auto\fR" vector name.  The \fBcreate\fR operation will generate a 
 unique vector name.
 .CS
 set vec [vector create #auto]
@@ -508,23 +533,34 @@ puts $vecName(0)
 vecName offset -5
 puts $vecName(-5)
 .CE
+When \fImatrix numcols\fR is > 1, 2D indexes are supported using
+ROW,COL form.
+.CS
+vecName matrix numcols 3
+puts vecName(0,2)
+.CE
 You can also use numeric expressions as indices.  The result
 of the expression must be an integer value.  
 .CS
 set n 21
 set vecName($n+3) 50.2
 .CE
-The following special non-numeric indices are available: \f(CWmin\fR, \f(CWmax\fR, \f(CWend\fR, and
-\f(CW++end\fR.  
+The following special non-numeric indices are available: \fBmin\fR, \fBmax\fR, \fBend\fR, and
+\fB++end\fR.  
 .CS
 puts "min = $vecName($min)"
 set vecName(end) -1.2
 .CE
-The indices \f(CWmin\fR and \f(CWmax\fR will return the minimum and maximum
-values of the vector.  The index \f(CWend\fR returns the value of the 
-last component in the vector.  The index \f(CW++end\fR is used to append
+The indices \fBmin\fR and \fBmax\fR will return the minimum and maximum
+values of the vector.  Also available are: \fBprod\fR,  \fBsum\fR, 
+and \fBmean\fR.
+The index \fBend\fR returns the value of the 
+last component in the vector.
+he index \fBend,0\fR returns the value of the 
+last row in column 0 of the vector.
+The index \fB++end\fR is used to append
 new value onto the vector.  It automatically extends the vector by
-one component and sets its value.
+numcols and sets its value.
 .CS
 # Append an new component to the end
 set vecName(++end) 3.2
@@ -541,12 +577,23 @@ puts $vecName(:)
 .CE
 .SH VECTOR OPERATIONS
 .TP
+\fBvector configure \fI? -flush bool -watchunset bool -oldcreate bool -maxsize int -novariable bool -nocommand bool?\fR
+The \fBconfigure\fR operation sets the default options used
+in creating vectors: these options are global to the interpreter.
+The \fI\-maxsize\fR option, when non-zero, limits creation size.
+The \fI\-oldcreate\fR enable the creation shortcut: \fBvector vec1 vec2 ...\fR.
+See the create command for details on the others.
+By default, these are all disabled or zero.
+.RE
+.TP
 \fBvector create \fIvecName\fR?(\fIsize\fR)?... \fR?\fIswitches\fR? 
-The \fBcreate\fR operation creates a new vector \fIvecName\fR.  Both a
-Tcl command and array variable \fIvecName\fR are also created.  The
+The \fBcreate\fR operation creates a new vector \fIvecName\fR. The
+\fIsize\fR may be an integer, a START:END range or ROW,COL (see matrix).
+This creates both a
+Tcl command and array variable called \fIvecName\fR.  The
 name \fIvecName\fR must be unique, so another Tcl command or array
-variable can not already exist in that scope.  You can access the
-components of the vector using its variable.  If you change a value in
+variable can not already exist in the current scope.  You may access the
+components of the vector using the  variable.  If you change a value in
 the array, or unset an array element, the vector is updated to reflect
 the changes.  When the variable \fIvecName\fR is unset, the vector and
 its Tcl command are also destroyed.
@@ -574,14 +621,25 @@ Indicates that the vector should automatically delete itself if
 the variable associated with the vector is unset.  By default,
 the vector will not be deleted.  This is different from previous
 releases.  Set \fIboolean\fR to "true" to get the old behavior.
+.TP
+\fB\-flush \fIboolean\fR
+Indicates that the vector should automatically flush the cached
+variable elements which unsets all the elements of the Tcl array
+variable associated with the vector, freeing memory associated 
+with the variable. This includes both the hash table and the hash keys.
+The down side is that this effectively flushes the caching of vector
+elements in the array.  This means that the subsequent reads
+of the array will require a decimal to string conversion.
+By default, flushing is disabled.
 .RE
 .TP
 \fBvector destroy \fIvecName\fR \fR?\fIvecName...\fR?
+Destroy vectors.
 .TP
 \fBvector expr \fIexpression\fR
 .RS
 All binary operators take vectors as operands (remember that numbers
-are treated as one-component vectors).  The exact action of binary
+are treated as one-component vectors).The exact action of binary
 operators depends upon the length of the second operand.  If the
 second operand has only one component, then each element of the first
 vector operand is computed by that value.  For example, the expression
@@ -610,7 +668,6 @@ Add and subtract.
 .TP 20
 \fB<<\0\0>>\fR
 Left and right shift.  Circularly shifts the values of the vector 
-(not implemented yet).
 .TP 20
 \fB<\0\0>\0\0<=\0\0>=\fR
 Boolean less, greater, less than or equal, and greater than or equal.
@@ -622,9 +679,6 @@ Boolean equal and not equal.
 Each operator returns a vector of ones and zeros.  If the condition is true, 
 1.0 is the component value, 0.0 otherwise.
 .TP 20
-\fB|\fR
-Bit-wise OR.  (Not implemented).
-.TP 20
 \fB&&\fR
 Logical AND.  Produces a 1 result if both operands are non-zero, 0 otherwise.
 .TP 20
@@ -632,8 +686,9 @@ Logical AND.  Produces a 1 result if both operands are non-zero, 0 otherwise.
 Logical OR.  Produces a 0 result if both operands are zero, 1 otherwise.
 .TP 20
 \fIx\fB?\fIy\fB:\fIz\fR
-If-then-else, as in C.  (Not implemented yet).
+If-then-else, as in C.
 .LP
+.sp
 See the C manual for more details on the results produced by each
 operator.  All of the binary operators group left-to-right within the
 same precedence level.  
@@ -642,7 +697,17 @@ Several mathematical functions are supported for vectors.  Each of
 the following functions invokes the math library function of the same name;
 see the manual entries for the library functions for details on what
 they do.  The operation is applied to all elements of the vector
-returning the results. 
+returning the results.   All functions take a vector operand.
+If no vector operand is used in the call, the current
+vector is assumed. eg.
+.CS
+vector create aVec
+aVec seq 0 100
+aVec expr {2*abs(aVec)-1}
+aVec length 100
+aVec expr {2*row()}
+vector expr {2*row()} ; # ERROR!
+.CE
 .CS
 .ta 3c 6c 9c
 \fBacos\fR     \fBcos\fR       \fBhypot\fR     \fBsinh\fR 
@@ -720,25 +785,66 @@ Returns the variance of the vector. The sum of the squared differences
 between each component and the mean is computed.  The variance is 
 the sum divided by the length of the vector minus 1.
 .PP
-The last set returns a vector of the same length as the argument.
+This last set of functions returns a vector of the same length as the argument.
+.TP 1i
+\fBinvert\fR
+Returns vector with elements in reversed order.
 .TP 1i
 \fBnorm\fR 
 Scales the values of the vector to lie in the range [0.0..1.0].
 .TP 1i
+\fBrow\fR 
+Psuedo function to get the current row.
+.TP 1i
 \fBsort\fR
 Returns the vector components sorted in ascending order.
+.TP 1i
+\fBshift(nVec,N)\fR
+This is the only function taking a second arg.
+It provides a version of \fInvec\fR shifted by N places.
+When N is a scalar or vector with only one element,
+shift fills vacant area with 0. Otherwise the second element of
+\fInVec\fR is used for the fill value.
+One use for this is providing running totals.
 .RE
 .TP
 \fBvector names \fR?\fIpattern\fR?
+Return names of all defined vectors.
+.RE
+.TP
+\fBvector op\fR \fIoperation vecName\fR ?\fIarg\fR?...
+Invoke instance operation.  Supported operations are defined in the next section.
+Op is the only way to invoke instance operation sub-commands
+when -command is defined as empty in
+a vector.  It also allows writing vector code that is checkable
+by a syntax checkers.  eg.
+.CS
+
+vector create v1
+v1 op append {1 2 3}
+v1 op modify 1 2.1
+
+.CE
+.RE
 .SH INSTANCE OPERATIONS
 You can also use the vector's Tcl command to query or modify it.  The
 general form is
 .DS
 \fIvecName \fIoperation\fR \fR?\fIarg\fR?...
 .DE
+Note this is equivalent to the form:
+.DS
+\fBvector op\fR \fIoperation vecName\fR ?\fIarg\fR?...
+.DE
 Both \fIoperation\fR and its arguments determine the exact behavior of
 the command.  The operations available for vectors are listed below.
 .TP
+\fIvecName \fB+\fR \fIitem\fR
+\fIvecName \fB-\fR \fIitem\fR
+\fIvecName \fB*\fR \fIitem\fR
+\fIvecName \fB/\fR \fIitem\fR
+Perform binary op and return result as a list.
+.TP
 \fIvecName \fBappend\fR \fIitem\fR ?\fIitem\fR?...
 Appends the component values from \fIitem\fR to \fIvecName\fR.
 \fIItem\fR can be either the name of a vector or a list of numeric
@@ -768,6 +874,9 @@ required for each value.  The letter indicates the type: "i" for signed,
 "u" for unsigned, "r" or real.  The default format is "r16".
 .RE
 .TP
+\fIvecName \fBbinwrite\fR \fIchannel\fR ?\fIlength\fR? ?\fI\-at index\fR? 
+Like \fBbinread\fR, but writes data.
+.TP
 \fIvecName \fBclear\fR 
 Clears the element indices from the array variable associated with
 \fIvecName\fR.  This doesn't affect the components of the vector.  By
@@ -797,51 +906,144 @@ Both scalar and vector math operations are allowed.  All values in
 expressions are either real numbers or names of vectors.  All numbers
 are treated as one component vectors.
 .TP
+\fIvecName \fBindex\fR \fIindex\fR ?\fIvalue\fR?...
+Get/set individual vector values.  This provides element
+updating when \fI\-variable\fR is set to empty.
+.TP
+\fIvecName \fBinsert\fR \fIindex\fR \fIitem\fR ?\fIitem\fR?...
+Inserts the component values from \fIitem\fR to \fIvecName\fR at
+\fIindex\fR \fIItem\fR can be either the name of a vector or
+a list of numeric values.
+.TP
 \fIvecName \fBlength\fR ?\fInewSize\fR?
 Queries or resets the number of components in \fIvecName\fR.
 \fINewSize\fR is a number specifying the new size of the vector.  If
 \fInewSize\fR is smaller than the current size of \fIvecName\fR,
 \fIvecName\fR is truncated.  If \fInewSize\fR is greater, the vector
-is extended and the new components are initialized to \f(CW0.0\fR.  If
+is extended and the new components are initialized to \fB0.0\fR.  If
 no \fInewSize\fR argument is present, the current length of the vector
 is returned.
 .TP
+\fIvecName \fBmatrix \fI ...\fR
+Matrix provides a 2D array view into 1D data.  It provides indexing operations
+in ROW,COL form making it suitable for use with TkTable.
+Data storage remains unchanged: vectors are still just a single long array.
+For example, here are two ways to create a 3 column by 10 row matrix:
+.CS
+
+vector create aVec(10,3)
+vector create bVec(30)
+bVec matrix numcols 3
+set aVec(0,0) 99
+set bVec(29,2) -99
+aVec append {5 6 7}; # aVec now has 11 rows.
+aVec append 1 2;     # Now aVec has 13 rows!
+
+.CE
+Note that data is appended only in increments of numcols.
+Elements 0-2 make up the first row, 3-5 the second, etc.
+Elements will appear only in increments of the column size.
+.RS
+.TP 0.75i
+\fIvecName \fBmatrix copy \fIdstcolumn\fR \fIsrccolumn\fR \fI?srcVec?\fR  
+Copy a column of element values
+to column \fIdstcolumn\fR from \fIsrccolumn\fR.
+If vector \fIsrcVec\fR is given, and not the same as \fIvecName\fR, the
+columns numbers must be different.
+If the \fIsrcVec\fR column is longer, \fIvecName\fR will be extended.
+If shorter, remaining destination values are not overwritten.
+.TP
+\fIvecName \fBmatrix delete \fIcolumn\fR.
+Delete elements in a column.
+Note that \fBnumcols\fR, which must be greater than 1, will be decremented.
+.TP
+\fIvecName \fBmatrix get \fIcolumn\fR
+Get the element in a column:  this number must be
+less than \fBnumcols\fR.
+Note that \fBnumcols\fR must be non-zero.
+.TP
+\fIvecName \fBmatrix insert \fIcolumn\fR \fI?initvalue?\fR .
+Insert a new column of elements at column (default 0).
+The new column is initialized
+with \fIinitvalue\fR, or \fI0.0\fR if not specified.
+Note that \fBnumcols\fR will be incremented.
+.TP
+\fIvecName \fBmatrix multiply \fIsrcVec\fR ?\fIdstVec\fR? 
+Perform matrix multiplication using \fBsrcVec\fR,
+placing results either in \fBdstVec\fR, or returned as a list.
+The numrows of \fIsrcVec\fR must equal numcols in
+\fIvecName\fR.  One application for multiply is coordinate transformation.
+.TP
+\fIvecName \fBmatrix numcols \fI?size?\fR
+Get or set the number of columns for a vectors data.  Values >1 enable
+array variables to accept 2d matrix indexes.
+For example with a numcols of 10, \fB$vec1(1,2)\fR refers to the
+13th element in the vector. A vectors size is also constrained
+to multiples of numcols, as is it's offset.
+By default, numcols is 1.
+.TP
+\fIvecName \fBmatrix numrows \fI?size?\fR
+Get or set the length of rows in a columns for a vector.
+By default, this is just the \fIvector length/numcols\fR.
+Setting this value simply provides a convenient way to increase or decrease
+the vector size by multiples of \fInumcols\fR.
+.TP
+\fIvecName \fBmatrix set \fIcolumn\fR \fI?valuelist?\fR
+Set value  elements in a column:  this number must be
+less than \fBnumcols\fR.  The \fIvaluelist\fR is a list values.
+If this list is shorter than the column, it's last
+value is used for all remaining columns. The column gets set to
+the values of \fIitem\fR, or \fI0.0\fR by default.
+.TP
+\fIvecName \fBmatrix shift \fIcolumn\fR \fIamount\fR ?\fIstartoffset\fR?
+Shifts the values of a column by integer in\fIamount\fR.  A negative
+value shifts upward.
+The \fIstartoffset\fR indicates where to start shifting from.
+.TP
+\fIvecName \fBmatrix sort \fIcolumn\fR \fI?-reverse?\fR
+Sort the vector by the given column.
+.TP
+\fIvecName \fBmatrix transpose\fR
+Transpose all columns with rows in matrix.
+Note that this is a no-op if \fBnumcols\fR is 1.  Otherwise,
+numcols will change to \fBvectorLength/numcols\fR.
+.RE
+.TP
 \fIvecName \fBmerge\fR \fIsrcName\fR ?\fIsrcName\fR?...
 Merges the named vectors into a single vector.  The resulting 
 vector is formed by merging the components of each source vector 
 one index at a time.
 .TP
-\fIvecName \fBnotify\fR \fIkeyword\fR
-Controls how vector clients are notified of changes to the vector.  
+\fIvecName \fBnotify\fR ?\fIkeyword\fR? ?\fIscript\fR?
+Queries or controls how vector clients are notified of changes
+to the vector.  Also allows setting a notifier callback.
 The exact behavior is determined by \fIkeyword\fR.
 .RS
 .TP 0.75i
-\f(CWalways\fR 
+\fBalways\fR 
 Indicates that clients are to be notified immediately whenever the
 vector is updated.
 .TP
-\f(CWnever\fR
+\fBnever\fR
 Indicates that no clients are to be notified.
 .TP
-\f(CWwhenidle\fR
+\fBwhenidle\fR
 Indicates that clients are to be notified at the next idle point
 whenever the vector is updated.
 .TP
-\f(CWnow\fR
+\fBnow\fR
 If any client notifications is currently pending, they are notified
 immediately.
 .TP
-\f(CWcancel\fR
+\fBcancel\fR
 Cancels pending notifications of clients using the vector.
 .TP
-\f(CWpending\fR
-Returns \f(CW1\fR if a client notification is pending, and \f(CW0\fR otherwise.
-.RE
+\fBpending\fR
+Returns \fB1\fR if a client notification is pending, and \fB0\fR otherwise.
 .TP
-\fIvecName \fBoffset\fR ?\fIvalue\fR?
-Shifts the indices of the vector by the amount specified by \fIvalue\fR.
-\fIValue\fR is an integer number.  If no \fIvalue\fR argument is 
-given, the current offset is returned.
+\fBcallback\fR ?\fIscript\fR?
+Query or set a Tcl callback script that is evaluated when a vector is updated.
+.RE
 .TP
 \fIvecName \fBpopulate\fR \fIdestName\fR ?\fIdensity\fR?
 Creates a vector \fIdestName\fR which is a superset of \fIvecName\fR.
@@ -864,7 +1066,7 @@ Searches for a value or range of values among the components of
 indices of the components which equal \fIvalue\fR is returned.  If a
 second \fIvalue\fR is also provided, then the indices of all
 components which lie within the range of the two values are returned.
-If no components are found, then \f(CW""\fR is returned.
+If no components are found, then \fB""\fR is returned.
 .TP
 \fIvecName \fBset\fR \fIitem\fR
 Resets the components of the vector to \fIitem\fR. \fIItem\fR can
@@ -889,6 +1091,10 @@ names of vectors which will be rearranged in the same manner as
 You could use this to sort the x vector of a graph, while still
 retaining the same x,y coordinate pairs in a y vector.
 .TP
+\fIvecName \fBsplit\fR \fIdstName\fR ?\fIdstName\fR?...
+Split the vector into a multiple vectors.  The resulting 
+N vectors each contain the mod-Nth element from source.
+.TP
 \fIvecName \fBvariable\fR \fIvarName\fR
 Maps a Tcl variable to the vector, creating another means for 
 accessing the vector.  The variable \fIvarName\fR can't already 
@@ -898,7 +1104,7 @@ may have.
 .SH C LANGUAGE API
 You can create, modify, and destroy vectors from C code, using 
 library routines.  
-You need to include the header file \f(CWblt.h\fR. It contains the
+You need to include the header file \fBblt.h\fR. It contains the
 definition of the structure \fBBlt_Vector\fR, which represents the
 vector.  It appears below.
 .CS
@@ -941,10 +1147,10 @@ variable \fIvecName\fR.  Neither a command nor variable named
 placed into \fIvecPtrPtr\fR.
 .TP
 Results:
-Returns \f(CWTCL_OK\fR if the vector is successfully created.  If
+Returns \fBTCL_OK\fR if the vector is successfully created.  If
 \fIlength\fR is negative, a Tcl variable or command \fIvecName\fR
 already exists, or memory cannot be allocated for the vector, then
-\f(CWTCL_ERROR\fR is returned and \fIinterp->result\fR will contain an
+\fBTCL_ERROR\fR is returned and \fIinterp->result\fR will contain an
 error message.
 .RE
 .sp
@@ -968,8 +1174,8 @@ which must already exist.  Both the Tcl command and array variable
 immediately that the vector has been destroyed.
 .TP
 Results:
-Returns \f(CWTCL_OK\fR if the vector is successfully deleted.  If
-\fIvecName\fR is not the name a vector, then \f(CWTCL_ERROR\fR is returned
+Returns \fBTCL_OK\fR if the vector is successfully deleted.  If
+\fIvecName\fR is not the name a vector, then \fBTCL_ERROR\fR is returned
 and \fIinterp->result\fR will contain an error message.
 .RE
 .sp
@@ -993,8 +1199,8 @@ the vector are destroyed.  All clients of the vector will be notified
 immediately that the vector has been destroyed.
 .TP
 Results:
-Returns \f(CWTCL_OK\fR if the vector is successfully deleted.  If
-\fIvecName\fR is not the name a vector, then \f(CWTCL_ERROR\fR is returned
+Returns \fBTCL_OK\fR if the vector is successfully deleted.  If
+\fIvecName\fR is not the name a vector, then \fBTCL_ERROR\fR is returned
 and \fIinterp->result\fR will contain an error message.
 .RE
 .sp
@@ -1018,8 +1224,8 @@ vector which must already exist.  \fIVecPtrPtr\fR will point be set to
 the address of the vector.
 .TP
 Results:
-Returns \f(CWTCL_OK\fR if the vector is successfully retrieved.  If
-\fIvecName\fR is not the name of a vector, then \f(CWTCL_ERROR\fR is
+Returns \fBTCL_OK\fR if the vector is successfully retrieved.  If
+\fIvecName\fR is not the name of a vector, then \fBTCL_ERROR\fR is
 returned and \fIinterp->result\fR will contain an error message.
 .RE
 .sp
@@ -1051,18 +1257,18 @@ elements in the array. \fIArraySize\fR is the actual size of the array
 it). \fIFreeProc\fP indicates how the storage for the vector component
 array (\fIdataArr\fR) was allocated.  It is used to determine how to
 reallocate memory when the vector is resized or destroyed.  It must be
-\f(CWTCL_DYNAMIC\fR, \f(CWTCL_STATIC\fR, \f(CWTCL_VOLATILE\fR, or a pointer
+\fBTCL_DYNAMIC\fR, \fBTCL_STATIC\fR, \fBTCL_VOLATILE\fR, or a pointer
 to a function to free the memory allocated for the vector array. If
-\fIfreeProc\fR is \f(CWTCL_VOLATILE\fR, it indicates that \fIdataArr\fR
-must be copied and saved.  If \fIfreeProc\fR is \f(CWTCL_DYNAMIC\fR, it
+\fIfreeProc\fR is \fBTCL_VOLATILE\fR, it indicates that \fIdataArr\fR
+must be copied and saved.  If \fIfreeProc\fR is \fBTCL_DYNAMIC\fR, it
 indicates that \fIdataArr\fR was dynamically allocated and that Tcl
-should free \fIdataArr\fR if necessary.  \f(CWStatic\fR indicates that
+should free \fIdataArr\fR if necessary.  \fBStatic\fR indicates that
 nothing should be done to release storage for \fIdataArr\fR.
 .TP
 Results:
-Returns \f(CWTCL_OK\fR if the vector is successfully resized.  If
+Returns \fBTCL_OK\fR if the vector is successfully resized.  If
 \fInewSize\fR is negative, a vector \fIvecName\fR does not exist, or
-memory cannot be allocated for the vector, then \f(CWTCL_ERROR\fR is
+memory cannot be allocated for the vector, then \fBTCL_ERROR\fR is
 returned and \fIinterp->result\fR will contain an error message.
 .RE
 .sp
@@ -1083,14 +1289,14 @@ Description:
 Resets the length of the vector pointed to by \fIvecPtr\fR to
 \fInewSize\fR.  If \fInewSize\fR is smaller than the current size of
 the vector, it is truncated.  If \fInewSize\fR is greater, the vector
-is extended and the new components are initialized to \f(CW0.0\fR.
+is extended and the new components are initialized to \fB0.0\fR.
 Calling \fBBlt_ResetVector\fR will trigger the vector to dispatch
 notifications.
 .TP
 Results:
-Returns \f(CWTCL_OK\fR if the vector is successfully resized.  If
+Returns \fBTCL_OK\fR if the vector is successfully resized.  If
 \fInewSize\fR is negative or memory can not be allocated for the vector, 
-then \f(CWTCL_ERROR\fR is returned and \fIinterp->result\fR will contain 
+then \fBTCL_ERROR\fR is returned and \fIinterp->result\fR will contain 
 an error message.
 .sp
 .PP
@@ -1110,7 +1316,7 @@ Description:
 Indicates if a vector named \fIvecName\fR exists in \fIinterp\fR.
 .TP
 Results:
-Returns \f(CW1\fR if a vector \fIvecName\fR exists and \f(CW0\fR otherwise.
+Returns \fB1\fR if a vector \fIvecName\fR exists and \fB0\fR otherwise.
 .RE
 .sp
 .PP
@@ -1143,8 +1349,8 @@ is an enumerated type.
 .RS
 .sp
 typedef enum {
-    \f(CWBLT_VECTOR_NOTIFY_UPDATE\fR=1,
-    \f(CWBLT_VECTOR_NOTIFY_DESTROY\fR=2
+    \fBBLT_VECTOR_NOTIFY_UPDATE\fR=1,
+    \fBBLT_VECTOR_NOTIFY_DESTROY\fR=2
 } \fBBlt_VectorNotify\fR;
 .sp
 .RE
@@ -1169,7 +1375,7 @@ when the vector is updated or destroyed.
 .TP
 Results:
 Returns a client identifier if successful.  If \fIvecName\fR is not
-the name of a vector, then \f(CWNULL\fR is returned and
+the name of a vector, then \fBNULL\fR is returned and
 \fIinterp->result\fR will contain an error message.
 .RE
 .sp
@@ -1193,7 +1399,7 @@ vector client identifier allocated by \fBBlt_AllocVectorId\fR.
 \fIVecPtrPtr\fR will point be set to the address of the vector.
 .TP
 Results:
-Returns \f(CWTCL_OK\fR if the vector is successfully retrieved.  
+Returns \fBTCL_OK\fR if the vector is successfully retrieved.  
 .RE
 .sp
 .PP
@@ -1216,7 +1422,7 @@ associated with \fIclientId\fR is updated or deleted.  \fIProc\fR is a
 pointer to call-back routine and must be of the type
 \fBBlt_VectorChangedProc\fR.  \fIClientData\fR is a one-word value to
 be passed to the routine when it is invoked. If \fIproc\fR is
-\f(CWNULL\fR, then the client is not notified.
+\fBNULL\fR, then the client is not notified.
 .TP
 Results:
 The designated call-back procedure will be invoked when the vector is 
@@ -1264,7 +1470,7 @@ Retrieves the name of the vector associated with the client identifier
 Results:
 Returns the name of the vector associated with \fIclientId\fR.  If
 \fIclientId\fR is not an identifier or the vector has been destroyed, 
-\f(CWNULL\fR is returned.
+\fBNULL\fR is returned.
 .RE
 .sp
 .PP