Download modules/core/misc/objc/common/FloatVector.h from tgollogly/test: direct link, hf CLI and curl.
- Browser
- Download file 1.75 kB
-
https://huggingface.co/tgollogly/test/resolve/main/modules/core/misc/objc/common/FloatVector.h
- Command line
-
hf download hf://tgollogly/test/modules/core/misc/objc/common/FloatVector.h
-
curl -L -o FloatVector.h https://huggingface.co/tgollogly/test/resolve/main/modules/core/misc/objc/common/FloatVector.h
1.75 kB
| // | |
| // FloatVector.h | |
| // | |
| // Created by Giles Payne on 2020/01/04. | |
| // | |
| NS_ASSUME_NONNULL_BEGIN | |
| /** | |
| * Utility class to wrap a `std::vector<float>` | |
| */ | |
| CV_EXPORTS @interface FloatVector : NSObject | |
| /** | |
| * Create FloatVector and initialize with the contents of an NSData object | |
| * @param data NSData containing raw float array | |
| */ | |
| -(instancetype)initWithData:(NSData*)data; | |
| /** | |
| * Create FloatVector and initialize with the contents of another FloatVector object | |
| * @param src FloatVector containing data to copy | |
| */ | |
| -(instancetype)initWithVector:(FloatVector*)src; | |
| /** | |
| * Create FloatVector from raw C array | |
| * @param array The raw C array | |
| * @elements elements The number of elements in the array | |
| */ | |
| -(instancetype)initWithNativeArray:(float*)array elements:(NSInteger)elements; | |
| /** | |
| * Create FloatVector from std::vector<float> | |
| * @param src The std::vector<float> object to wrap | |
| */ | |
| -(instancetype)initWithStdVector:(std::vector<float>&)src; | |
| +(instancetype)fromNative:(std::vector<float>&)src; | |
| /** | |
| * Length of the vector | |
| */ | |
| @property(readonly) NSInteger length; | |
| /** | |
| * Raw C array | |
| */ | |
| @property(readonly) float* nativeArray; | |
| /** | |
| * The wrapped std::vector<float> object | |
| */ | |
| @property(readonly) std::vector<float>& nativeRef; | |
| /** | |
| * NSData object containing the raw float data | |
| */ | |
| @property(readonly) NSData* data; | |
| /** | |
| * Return array element | |
| * @param index Index of the array element to return | |
| */ | |
| -(float)get:(NSInteger)index; | |
| @end | |
| NS_ASSUME_NONNULL_END | |