shh.homolalg
Class Qvsp

Object
  extended byQvsp
All Implemented Interfaces:
ExactCategoryObj, Obj

public class Qvsp
extends Object
implements ExactCategoryObj

A Q-vector space--that is, a finite-dimensional vector space over the field Q of rational numbers.

The constructor returns Qn, where n is the dimension. We imagine this space has the standard basis {(1,0,...,0), (0,1,0,...,0), ...}. All QvspMorphisms are represented by matrices with respect to these standard bases.

There is no special implementation of Object.equals(java.lang.Object).

The only interesting method is getDim(). After all, in a category, the objects aren't interesting--all the interest resides in the morphisms. :-)

Author:
Mark McConnell

Field Summary
static Qvsp GROUNDFIELD
          A rational vector space of dimension 1 and print name Q.
static Qvsp ZERO
          A standard zero object in this exact category.
 
Constructor Summary
Qvsp(int n)
          Constructs a copy of Qn for n ≥ 0.
 
Method Summary
 int getDim()
          The dimension of this vector space.
 Morphism getIdMorphism()
          Returns an identity morphism from this object to itself.
 String getName()
          Returns the name set by setName(java.lang.String), or null if none has been set.
 ExactCategoryMorphism getZeroMorphism(ExactCategoryObj source)
          Returns the zero morphism from source to this.
 boolean isZero()
          Whether this is a zero object.
static Qvsp makeInstance(int n)
          Constructs and returns a copy of Qn for n ≥ 0.
 void setName(String name)
          Sets the name.
 String toString()
          Returns the name, if one has been set by setName(java.lang.String), or else returns a String like Q^17.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ZERO

public static final Qvsp ZERO
A standard zero object in this exact category. It's just a vector space of dimension 0 with print name 0.


GROUNDFIELD

public static final Qvsp GROUNDFIELD
A rational vector space of dimension 1 and print name Q. We imagine it has the canonical basis {1}. In the rare cases where we want one, a vector in a Qvsp V is specified by giving a QvspMorphism from GROUNDFIELD to V.

Constructor Detail

Qvsp

public Qvsp(int n)
Constructs a copy of Qn for n ≥ 0.

Method Detail

makeInstance

public static Qvsp makeInstance(int n)
Constructs and returns a copy of Qn for n ≥ 0. If n = 0, returns ZERO.


getDim

public int getDim()
The dimension of this vector space.


getName

public final String getName()
Returns the name set by setName(java.lang.String), or null if none has been set. See toString().


setName

public final void setName(String name)
Sets the name. See toString().


toString

public String toString()
Returns the name, if one has been set by setName(java.lang.String), or else returns a String like Q^17.


getIdMorphism

public Morphism getIdMorphism()
Description copied from interface: Obj
Returns an identity morphism from this object to itself.

Specified by:
getIdMorphism in interface Obj

isZero

public boolean isZero()
Description copied from interface: ExactCategoryObj
Whether this is a zero object.

Specified by:
isZero in interface ExactCategoryObj

getZeroMorphism

public ExactCategoryMorphism getZeroMorphism(ExactCategoryObj source)
Description copied from interface: ExactCategoryObj
Returns the zero morphism from source to this.

Specified by:
getZeroMorphism in interface ExactCategoryObj