-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMatrix2D.h
More file actions
34 lines (29 loc) · 971 Bytes
/
Matrix2D.h
File metadata and controls
34 lines (29 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//
// Matrix2D.h
// TailorAsist
//
// Created by user1 on 14-9-3.
// Copyright (c) 2014年 user1. All rights reserved.
//
#import <Foundation/Foundation.h>
#define EPSILON 1e-5
#define EPSILON2 1e-10
@interface Matrix2D : NSObject
@property (nonatomic) int nrow;
@property (nonatomic) int ncol;
@property (nonatomic) NSData* data;
+ (double)vectorNorm2Square:(double*)buf length:(int)len;
+ (double)vectorNorm2:(double*)buf length:(int)len;
+ (Matrix2D*)householderMat:(Matrix2D*)vect;
+ (Matrix2D*)solveLinearRegression:(Matrix2D*)param Value:(Matrix2D*)val;
+ (Matrix2D*)identityMatrix:(int)n;
- (instancetype)initWithRowNum:(int)nRow colNum:(int)nCol;
- (void)setElement:(int)row Col:(int)col Value:(double)val;
- (double)getElement:(int)row Col:(int)col;
- (Matrix2D*)multiple:(Matrix2D*)mat;
- (void)scalarMultiple:(double)scal;
- (Matrix2D*)add:(Matrix2D*)mat;
- (Matrix2D*)upperExtendWithIdentity:(int)m;
- (Matrix2D*)transpose;
- (void)dumpContent;
@end