cog/Utils/NSArray+ShuffleUtils.h

33 lines
722 B
C
Raw Normal View History

2008-02-16 02:46:37 +00:00
//
// Pair.h
// Cog
//
// Created by Eric Hanneken on 2/13/08.
// Copyright 2008 Vincent Spader. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface NSArray (ShuffleUtils)
+ (NSArray *)arrayWithRandomLongs:(NSUInteger)count;
2008-02-16 02:46:37 +00:00
/*
* zip produces a new array by pairing successive objects
* from two input arrays until one is exhausted. Only
* pointers are copied; the objects are not.
*/
+ (NSArray *)zipArray:(NSArray *)x withArray:(NSArray *)y;
2008-02-16 02:46:37 +00:00
/*
* Unzip produces a new pair of arrays by separating
* an input array of pairs. Only pointers are copied;
* the objects are not.
*/
+ (NSArray *)unzipArray:(NSArray *)pairs;
2008-02-16 02:46:37 +00:00
- (NSComparisonResult)compareFirsts:(id)y;
2008-02-16 02:46:37 +00:00
- (id)first;
- (id)second;
@end