|
Boost : |
From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2005-03-09 05:03:43
Tobias Schwinger wrote:
> Larry Evans wrote:
>
>> On 03/08/2005 06:26 AM, Tobias Schwinger wrote:
>> [snip]
>>
>>> I use 'apply', 'apply_one' and 'apply_but' functions that allow me to
>>> apply functors to all elements, one element and all but one elements,
>>> respectively (I use different versions for both static and dynamic
>>> indices and both static and dynamic functors):
>>
>>
>>
>> What does "static" and "dynamic" mean here? Does static mean
>> "evaluable at compile time" and "dynamic" means otherwise?
>>
>
> Yes. A curious question: what else could it possibly mean in this context ?
>
>> [snip]
>>
>>> - Do you know the Boost.Assign technique ?
>>> I use a similar approach to have a nice syntax for initialization and
>>> inlining that works within expressions:
>>>
>>> my_quaternion = n_x * sin_half_a
>>> , n_y * sin_half_a
>>> , n_z * sin_half_a
>>> , cos_half_a;
>>>
>>> and
>>>
>>> vector_slice<0,3> (my_quaternion)
>>> = (vec_inl| n_x,n_y,0.0) * sin_half_a;
>>>
>> Never seen this (vec_inl| n_x,n_y,0.0). Looks like
>> a set expression or lambda expression. Could you
>> provide a reference. I searched:
>>
>> http://www.boost.org/libs/assign/doc/index.html#reference
>>
>> for the character '|' but got no results.
>
>
> This is _not_ Boost.Assign! As stated above it's part of my private
> library but it has some similarities to Boost.Assign.
>
> I use this to allow per-element data to be inlined in expressions.
> 'operator|' is overloaded for a tag type (vec_inl is a global of that
> type) and scalar types, creates an expression object for which an
> overloaded 'operator,' exists to append elements.
>
>>>
>>>
>>> ( The 'my_quaternion' variable from the examples is a
>>> four-dimensional vector, _not_ a boost::quaternion. )
>>>
>> Does "four-dimensional" mean "length is four" or "accessing a scalar
>> requires four indices passed to the operator()", e.g.
>
>
> Is this really that ambiguous ? AFAIK it's a proper mathematical term...
^^^^^^^^
By reading my post again this sounds a bit rude. No offense intended,
here (as one unclear information in the middle of a text may cause a
"domino effect" of doubt propagating through its tail).
> Besides quaternions consist of four scalars (so I might as well omitted
> 'four-dimensional'). I found it necessary to disclaim it's not a
> boost::quaternion, though...
-- Tobias
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk