algorithms/ transform.bi

Summary
algorithms/ transform.bi
LicenseCopyright © 2009, FreeBASIC Extended Library Development Group
Functions
TransformApplies an operation //op// on each element in the range [//first//, //last//), storing the results of the transformation in the range starting at //result//.
TransformApplies an operation //op// on each of the corresponding elements in the ranges [//first//, //last//) and [//first2//, //first2// + //last//-//first//), storing the results of the transformation in the range starting at //result//.

License

Copyright © 2009, FreeBASIC Extended Library Development Group

Distributed under the FreeBASIC Extended Library Group license.  See accompanying file LICENSE.txt or copy at http://code.google.com- /p- /fb-extended-lib- /wiki- /License

Functions

Transform

declare function Transform overload (
   byval first as fbext_TypeName(T_) ptr,
   byval last as fbext_TypeName(T_) ptr,
   byval result as fbext_TypeName(T_) ptr,
   byval op as function ( byref as fbext_TypeName(T_) ) as fbext_TypeName(T_)
) as fbext_TypeName(T_) ptr

Applies an operation //op// on each element in the range [//first//, //last//), storing the results of the transformation in the range starting at //result//.

Parameters

firstA pointer to the first element in the range.
lastA pointer to one-past the last element in the range.
resultA pointer to the first element in the range to recieve the result of the transformation.
opThe operation used to transform the elements.

Returns

Returns a pointer to one-past the last element copied.

Transform

declare function Transform overload (
   byval first as fbext_TypeName(T_) ptr,
   byval last as fbext_TypeName(T_) ptr,
   byval first2 as fbext_TypeName(T_) ptr,
   byval result as fbext_TypeName(T_) ptr,
   byval op as function ( byref as fbext_TypeName(T_), byref as fbext_TypeName(T_) ) as fbext_TypeName(T_)
) as fbext_TypeName(T_) ptr

Applies an operation //op// on each of the corresponding elements in the ranges [//first//, //last//) and [//first2//, //first2// + //last//-//first//), storing the results of the transformation in the range starting at //result//.

Parameters

firstA pointer to the first element in the first range.
lastA pointer to one-past the last element in the first range.
first2A pointer to the first element in the second range.
resultA pointer to the first element in the range to recieve the result of the transformation.
opThe operation used to transform the elements.

Returns

Returns a pointer to one-past the last element copied.

declare function Transform overload (
   byval first as fbext_TypeName(T_) ptr,
   byval last as fbext_TypeName(T_) ptr,
   byval result as fbext_TypeName(T_) ptr,
   byval op as function ( byref as fbext_TypeName(T_) ) as fbext_TypeName(T_)
) as fbext_TypeName(T_) ptr
Applies an operation //op// on each element in the range [//first//, //last//), storing the results of the transformation in the range starting at //result//.