MCPcopy Create free account
hub / github.com/Singular/Singular / Vector

Class Vector

Singular/dyn_modules/python/Poly.h:509–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

507
508};
509class Vector: public PolyBase<POLY_VARIANT_MODUL, Vector, MyErrorHandler>{
510 private:
511 typedef PolyBase<POLY_VARIANT_MODUL, Vector, MyErrorHandler> Base;
512 public:
513
514 Vector(ring r=currRing):Base ((poly)NULL,r,0){
515 }
516 Vector(int n, ring r=currRing):Base(*(new PolyImpl(n,r))){
517
518 }
519 Vector(const char* c, ring r=currRing):Base(c,r){
520
521 }
522 Vector(const Base& p):Base(p){
523 }
524
525
526 Vector(poly p, ring r):Base(p,r){
527
528 }
529 Vector(poly p, ring r, int):Base(p,r,0){
530 }
531 Vector(std::vector<int> v, ring r=currRing):Base(*(new PolyImpl((poly) NULL,r))){
532 unsigned int i;
533 int s=v.size();
534 poly p=p_ISet(1,r);
535 for(i=0;i<v.size();i++){
536 pSetExp(p,i+1,v[i]);
537 }
538 pSetm(p);
539 ptr.reset(new PolyImpl(p,r));
540 }
541 /* Poly& operator+=(const Number& n){
542 Poly p2(n);
543 ((PolyBase<POLY_VARIANT_MODUL, Poly>&) (*this))+=p2;
544 return *this;
545 }*/
546 Vector& operator+=(const Vector& p ){
547
548 ((Base&)*this)+=p;
549 return *this;
550 }
551 Vector& operator+=(const Base& p ){
552
553 ((Base&)*this)+=p;
554 return *this;
555 }
556 friend inline bool operator==(const Vector& p1, const Vector& p2);
557};
558
559//typedef Poly PolyBase<POLY_VARIANT_RING>::create_type;
560/*template <poly_variant v, class c> inline PolyBase<v> operator+(const PolyBase<v,c>& p1, const PolyBase<v,c>& p2){

Callers 4

ModuleMethod · 0.70
buildPyObjectFromLeftvFunction · 0.70
buildPyObjectFromIdhdlFunction · 0.70
unitVectorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected