Changeset 2945


Ignore:
Timestamp:
Oct 15, 2013 9:21:53 AM (6 years ago)
Author:
bradbell
Message:

vector.hpp: Improve documentation for vectorBool.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/cppad/vector.hpp

    r2910 r2945  
    188188$code CppAD::vectorBool$$.
    189189This has the same specifications as $code CppAD::vector<bool>$$
    190 with the following exceptions
    191 
    192 $list number$$
     190with the following exceptions:
     191
     192$subhead Memory$$
    193193The class $code vectorBool$$ conserves on memory
    194194(on the other hand, $code CppAD::vector<bool>$$ is expected to be faster
    195195than $code vectorBool$$).
    196196
    197 $lnext
     197$subhead Output$$
    198198The $code CppAD::vectorBool$$ output operator
    199199prints each boolean value as
     
    204204surrounding $code {$$, $code }$$ and with no separating commas or spaces.
    205205
    206 $lnext
     206$subhead Element Type$$
    207207If $icode x$$ has type $code vectorBool$$
    208208and $icode i$$ has type $code size_t$$,
    209 the element access value $icode%x%[%i%]%$$ has an unspecified type
    210 (referred to here as $icode elementType$$)
    211 that can be implicitly converted to $code bool$$.
    212 The return value of the assignment operator
     209the element access value $icode%x%[%i%]%$$ has an unspecified type,
     210referred to here as $icode elementType$$, that supports the following
     211operations:
     212
     213$list number$$
     214$icode elementType$$ can be converted to $code bool$$; e.g.
     215the following syntax is supported:
     216$codei%
     217        static_cast<bool>( %x%[%i%] )
     218%$$
     219
     220$lnext
     221$icode elementType$$ supports the assignment operator $code =$$ where the
     222right hand side is a $code bool$$ or an $icode elementType$$ object; e.g.,
     223if $icode y$$ has type $code bool$$, the following syntax is supported:
    213224$codei%
    214225        %x%[%i%] = %y%
    215226%$$
    216 also has type $icode elementType$$. Thus, if $icode z$$
    217 has type $code bool$$, the syntax
     227
     228$lnext
     229The result of an assignment to an $icode elementType$$
     230also has type $icode elementType$$.
     231Thus, if $icode z$$ has type $code bool$$, the following syntax is supported:
    218232$codei%
    219233        %z% = %x%[%i%] = %y%
    220234%$$
    221 is valid.
    222235$lend
    223236
  • trunk/omh/whats_new/whats_new_13.omh

    r2942 r2945  
    5656assist you in learning about changes between various versions of CppAD.
    5757
     58$head 10-15$$
     59The documentation for the class
     60$cref/vectorBool/CppAD_vector/vectorBool/$$ was improved.
     61
    5862$head 10-14$$
    5963The script $cref get_adolc.sh$$ was added
Note: See TracChangeset for help on using the changeset viewer.