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

Class Vector

kernel/old/old.Poly.h:479–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477
478};
479class Vector: public PolyBase<POLY_VARIANT_MODUL, Vector, MyErrorHandler>{
480 private:
481 typedef PolyBase<POLY_VARIANT_MODUL, Vector, MyErrorHandler> Base;
482 public:
483
484 Vector(ring r=currRing):Base ((poly)NULL,r,0){
485 }
486 Vector(int n, ring r=currRing):Base(*(new PolyImpl(n,r))){
487
488 }
489 Vector(const char* c, ring r=currRing):Base(c,r){
490
491 }
492 Vector(const Base& p):Base(p){
493 }
494
495
496 Vector(poly p, ring r):Base(p,r){
497
498 }
499 Vector(poly p, ring r, int):Base(p,r,0){
500 }
501 Vector(std::vector<int> v, ring r=currRing):Base(*(new PolyImpl((poly) NULL,r))){
502 unsigned int i;
503 int s=v.size();
504 poly p=p_ISet(1,r);
505 for(i=0;i<v.size();i++){
506 pSetExp(p,i+1,v[i]);
507 }
508 pSetm(p);
509 ptr.reset(new PolyImpl(p,r));
510 }
511 /* Poly& operator+=(const Number& n){
512 Poly p2(n);
513 ((PolyBase<POLY_VARIANT_MODUL, Poly>&) (*this))+=p2;
514 return *this;
515 }*/
516 Vector& operator+=(const Vector& p ){
517
518 ((Base&)*this)+=p;
519 return *this;
520 }
521 Vector& operator+=(const Base& p ){
522
523 ((Base&)*this)+=p;
524 return *this;
525 }
526 friend inline bool operator==(const Vector& p1, const Vector& p2);
527};
528
529//typedef Poly PolyBase<POLY_VARIANT_RING>::create_type;
530/*template <poly_variant v, class c> inline PolyBase<v> operator+(const PolyBase<v,c>& p1, const PolyBase<v,c>& p2){

Callers 2

unitVectorFunction · 0.70
ModuleMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected