Home Online Manual
Top
Back: align
Forward: bareiss
FastBack: Functions and system variables
FastForward: Control structures
Up: Functions
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

5.1.2 attrib

Syntax:
attrib ( name )
Type:
none
Purpose:
displays the attribute list of the object called name.
Example:
 
  ring r=0,(x,y,z),dp;
  ideal I=std(maxideal(2));
  attrib(I);
==> attr:isSB, type int
Syntax:
attrib ( name , string_expression )
Type:
any
Purpose:
returns the value of the attribute string_expression of the variable name. If the attribute is not defined for this variable, attrib returns the empty string.
Example:
 
  ring r=0,(x,y,z),dp;
  ideal I=std(maxideal(2));
  attrib(I,"isSB");
==> 1
  // maxideal(2) is a standard basis,
  // SINGULAR does know it for maxideal:
  attrib(maxideal(2), "isSB");
==> 1
Syntax:
attrib ( name, string_expression, expression )
Type:
none
Purpose:
sets the attribute string_expression of the variable name to the value expression.
Example:
 
  ring r=0,(x,y,z),dp;
  ideal I=maxideal(2); // the attribute "isSB" is not set
  vdim(I);
==> 4
  attrib(I,"isSB",0);  // the standard basis attribute is reset here
  vdim(I);
==> // ** I is no standard basis
==> 4
Remark:
An attribute may be described by any string_expression. Some of these are used by the kernel of SINGULAR and referred to as reserved attributes. Non-reserved attributes may be used, however, in procedures and can considerably speed up computations.
Reserved attributes:
(isSB, isHomog, rank are used by the kernel, the other are used by libraries)
isSB
the standard basis property is set by all commands computing a standard basis like groebner, std, stdhilb etc.; used by lift, dim, degree, mult, hilb, vdim, kbase
isHomog
the weight vector for homogeneous or quasihomogeneous ideals/modules
isCI
complete intersection property
isCM
Cohen-Macaulay property
rank
set/get the rank of a module (see nrows)
withSB
value of type ideal, resp. module, is std
withHilb
value of type intvec is hilb(_,1) (see hilb)
withRes
value of type list is a free resolution
withDim
value of type int is the dimension (see dim)
withMult
value of type int is the multiplicity (see mult)
See killattrib.