Top
Back: 5.1 Functions
Forward: 5.1.2 bareiss
FastBack: 5. Functions and system variables
FastForward: 6. Tricks and pitfalls
Up: 5.1 Functions
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

5.1.1 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
  // although maxideal(2) is a standard basis,
  // SINGULAR does not know it:
  attrib(maxideal(2), "isSB");
→ 0
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);
→ // ** I is no standardbasis
→ 4
  attrib(I,"isSB",1);  // the standard basis attribute is set here
  vdim(I);
→ 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:

(not all are in use at the moment)

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 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)


Top Back: 5.1 Functions Forward: 5.1.2 bareiss FastBack: 5. Functions and system variables FastForward: 6. Tricks and pitfalls Up: 5.1 Functions Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.