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:
(cf_class, global, isSB, isHomog, rank, ring_cf, rowShift are used by the kernel, the other are used by libraries)
cf_class (for ring)
the internal type of the coefficients (see n_coeffType)
global (for ring)
1, if the ordering is global
isSB (for ideal, module)
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 (for ideal, module)
the weight vector for homogeneous or quasihomogeneous ideals/modules
isCI
complete intersection property
isCM
Cohen-Macaulay property
maxExp (for ring)
limit for each exponent (32767 by default)
rank (for module)
set/get the rank of a module (see nrows)
ring_cf (for ring)
the coefficients of the polynomial ring are considered to be a ring
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.