Changeset 28192 in project


Ignore:
Timestamp:
01/30/13 08:10:58 (8 years ago)
Author:
Ivan Raikov
Message:

srfi-4-utils doc update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/srfi-4-utils

    r25596 r28192  
    1515{{srfi-4-utils}} contains a set of convenience procedures for
    1616[[http://srfi.schemers.org/srfi-4/srfi-4.html|SRFI-4]] vectors:
    17 {{fold}}, {{map}}, {{quick-sort!}}.
     17{{fold}}, {{map}}, {{quick-sort!}}, {{merge!}}, {{merge-sort!}}.
    1818
    1919=== Procedures
     
    6262where {{F :: I * V(I) [* V1(I) ... VN(I)] -> V}}
    6363
     64<procedure>s8vector-blit!  :: VFROM * I * END * VTO * J] -> V</procedure><br>
     65<procedure>u8vector-blit!  :: VFROM * I * END * VTO * J] -> V</procedure><br>
     66<procedure>s16vector-blit!  :: VFROM * I * END * VTO * J] -> V</procedure><br>
     67<procedure>u16vector-blit!  :: VFROM * I * END * VTO * J] -> V</procedure><br>
     68<procedure>s32vector-blit!  :: VFROM * I * END * VTO * J] -> V</procedure><br>
     69<procedure>u32vector-blit!  :: VFROM * I * END * VTO * J] -> V</procedure><br>
     70<procedure>f32vector-blit!  :: VFROM * I * END * VTO * J] -> V</procedure><br>
     71<procedure>f64vector-blit!  :: VFROM * I * END * VTO * J] -> V</procedure><br>
     72
     73Copies subvector {{VFROM[I,END)}} into {{VTO[J,J+(END-I))}}.
     74
     75<procedure>s8vector-merge!  :: ELT< * VA * P * Q * R * VB * N -> VB</procedure><br>
     76<procedure>u8vector-merge!  :: ELT< * VA * P * Q * R * VB * N -> VB</procedure><br>
     77<procedure>s16vector-merge!  :: ELT< * VA * P * Q * R * VB * N -> VB</procedure><br>
     78<procedure>u16vector-merge!  :: ELT< * VA * P * Q * R * VB * N -> VB</procedure><br>
     79<procedure>s32vector-merge!  :: ELT< * VA * P * Q * R * VB * N -> VB</procedure><br>
     80<procedure>u32vector-merge!  :: ELT< * VA * P * Q * R * VB * N -> VB</procedure><br>
     81<procedure>f32vector-merge!  :: ELT< * VA * P * Q * R * VB * N -> VB</procedure><br>
     82<procedure>f64vector-merge!  :: ELT< * VA * P * Q * R * VB * N -> VB</procedure><br>
     83
     84Given vector VA and indices P, Q, R such that P < Q < R, merges
     85subvector {{VA[P,Q)}} and subvector {{A[Q,R)}} into vector {{B[N,N+(R-P))}}.
     86The comparison function {{ELT<}} must be of type  {{ELT< :: i1 * V(i1) * i2 * V(i2) -> boolean}}.
     87
    6488
    6589<procedure>s8vector-quick-sort!  :: V * ELT< [ * START * END] -> V</procedure><br>
     
    7296<procedure>f64vector-quick-sort!  :: V * ELT< [ * START * END] -> V</procedure>
    7397
    74 where {{F :: i1 * V(i1) * i2 * V(i2) -> boolean}}
     98where {{ELT< :: i1 * V(i1) * i2 * V(i2) -> boolean}}
     99
     100<procedure>s8vector-merge-sort!  :: ELT< * V -> V</procedure><br>
     101<procedure>u8vector-merge-sort!  :: ELT< * V -> V</procedure><br>
     102<procedure>s16vector-merge-sort!  :: ELT< * V -> V</procedure><br>
     103<procedure>u16vector-merge-sort!  :: ELT< * V -> V</procedure><br>
     104<procedure>s32vector-merge-sort!  :: ELT< * V -> V</procedure><br>
     105<procedure>u32vector-merge-sort!  :: ELT< * V -> V</procedure><br>
     106<procedure>f32vector-merge-sort!  :: ELT< * V -> V</procedure><br>
     107<procedure>f64vector-merge-sort!  :: ELT< * V -> V</procedure>
     108
     109where {{ELT< :: i1 * V(i1) * i2 * V(i2) -> boolean}}
    75110
    76111
     
    97132=== Version history
    98133
     134; 1.9 : Added merge! and merge-sort! procedures
    99135; 1.6 : Documentation converted to wiki format
    100136; 1.5 : Ported to Chicken 4
     
    109145
    110146
    111  Copyright 2007-2010 Ivan Raikov and the Okinawa Institute of Science and Technology
     147 Copyright 2007-2013 Ivan Raikov and the Okinawa Institute of Science and Technology
    112148 
    113149 This program is free software: you can redistribute it and/or modify
Note: See TracChangeset for help on using the changeset viewer.