2023-05-18 15:34:05 +00:00
|
|
|
#ifndef __multivector_h
|
|
|
|
#define __multivector_h
|
|
|
|
#include <Object.h>
|
|
|
|
|
|
|
|
@class Algebra;
|
|
|
|
@class BasisLayout;
|
2023-05-27 03:39:13 +00:00
|
|
|
@class BasisBlase;
|
2023-05-18 15:34:05 +00:00
|
|
|
|
|
|
|
@interface MultiVector : Object
|
|
|
|
{
|
|
|
|
double *components;
|
|
|
|
Algebra *algebra;
|
|
|
|
BasisLayout *layout;
|
|
|
|
int num_components;
|
|
|
|
}
|
|
|
|
+(MultiVector *) new:(Algebra *) algebra;
|
|
|
|
// NOTE: values must have the same layout as algebra
|
|
|
|
+(MultiVector *) new:(Algebra *) algebra values:(double *) values;
|
|
|
|
+(MultiVector *) new:(Algebra *) algebra group:(BasisGroup *) group;
|
|
|
|
// NOTE: values must have the same layout as group
|
|
|
|
+(MultiVector *) new:(Algebra *) algebra group:(BasisGroup *) group values:(double *) values;
|
|
|
|
+(MultiVector *) copy:(MultiVector *) src;
|
2023-05-27 03:39:13 +00:00
|
|
|
|
|
|
|
-(double *) components;
|
|
|
|
-(int)indexFor:(unsigned)mask;
|
|
|
|
-(double *) componentFor:(BasisBlade *) blade;
|
|
|
|
|
2023-05-18 15:34:05 +00:00
|
|
|
-(MultiVector *) product:(MultiVector *) rhs;
|
2023-05-29 00:52:10 +00:00
|
|
|
-(MultiVector *) divide:(MultiVector *) rhs;
|
2023-05-18 15:34:05 +00:00
|
|
|
-(MultiVector *) wedge:(MultiVector *) rhs;
|
|
|
|
-(MultiVector *) dot:(MultiVector *) rhs;
|
2023-05-27 03:39:13 +00:00
|
|
|
-(MultiVector *) plus:(MultiVector *) rhs;
|
|
|
|
-(MultiVector *) minus:(MultiVector *) rhs;
|
2023-05-18 15:34:05 +00:00
|
|
|
-(MultiVector *) dual;
|
2023-05-24 09:25:47 +00:00
|
|
|
-(MultiVector *) reverse;
|
2023-05-18 15:34:05 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif//__multivector_h
|