repthy
Class HashHomom

Object
  extended byAbstractMap
      extended byHomomorphism
          extended byHashHomom
All Implemented Interfaces:
Map

public class HashHomom
extends Homomorphism

An implementation of Homomorphism backed by a HashMap that contains one copy of each key-value pair.

Author:
Mark McConnell

Nested Class Summary
 
Nested classes inherited from class Map
Map.Entry
 
Constructor Summary
HashHomom(Group sou, Group tar, Map map)
          Constructs a homomorphism from sou to tar.
 
Method Summary
 Set entrySet()
          Returns an unmodifiable Set view of the key-value pairs.
 Object get(Object o)
           
 Subgroup getKernel()
           
 int getKernelOrder()
           
static HashHomom make(Group sou, GroupElt[] souGen, Group tar, GroupElt[] tarImages)
          Returns the homomorphism from sou to tar sending the generators souGen to the corresponding elements tarImages, or returns null to indicate that such a homomorphism does not exist.
 
Methods inherited from class Homomorphism
apply, clear, containsKey, getImageOrder, getSource, getTarget, identity, inverse, inverseImage, isInjective, isIsomorphism, isSurjective, keySet, pullBack, put, putAll, remove
 
Methods inherited from class AbstractMap
clone, containsValue, equals, hashCode, isEmpty, size, toString, values
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HashHomom

public HashHomom(Group sou,
                 Group tar,
                 Map map)
Constructs a homomorphism from sou to tar. The keys of map are the elements of sou, its values lie in tar, and it satisfies the axioms for a homomorphism. There is no error-checking, but expect trouble if these conditions are not met. map is copied, so that changes to it later won't affect what's inside this group.

Method Detail

make

public static HashHomom make(Group sou,
                             GroupElt[] souGen,
                             Group tar,
                             GroupElt[] tarImages)
Returns the homomorphism from sou to tar sending the generators souGen to the corresponding elements tarImages, or returns null to indicate that such a homomorphism does not exist. The result is a proof that the homomorphism does exist, or doesn't, in the respective cases.

Throws:
IllegalArgumentException - If the elements don't belong to the right groups, or the array arguments have different lengths, or souGen doesn't generate.

entrySet

public Set entrySet()
Returns an unmodifiable Set view of the key-value pairs.


get

public Object get(Object o)

getKernel

public Subgroup getKernel()

getKernelOrder

public int getKernelOrder()
Overrides:
getKernelOrder in class Homomorphism