
/*
**  This file forms part of the GOBLIN C++ Class Library.
**
**  Written by Christian Fremuth-Paeger, September 1999.
**  
**  Copying, compiling, distribution and modification
**  of this source code is permitted only in accordance
**  with the GOBLIN general licence information.
*/             


#if !defined(_DNSSTRUC_H_)

#define _DNSSTRUC_H_

#include <genstruc.h>
#include <hashtbl.h>


class denseGraphStructure : public genericGraphStructure
{
protected:
        
    goblinHashTable<TArc,TFloat> *sub;
    
public:

    denseGraphStructure(abstractMixedGraph &GC,TOption options = 0) throw();
    ~denseGraphStructure() throw();

    TArc            InsertArc(TArc a,TCap cc,TCap bb,TFloat ll) throw(ERRange,ERRejected);
    TArc            InsertArc(TArc a) throw(ERRange,ERRejected);
    
    unsigned long   Size() throw();
    unsigned long   Allocated() throw();
    
    
    // *************************************************************** //
    //           Subgraph Management                                   //
    // *************************************************************** //

    void            NewSubgraph(TArc card) throw(ERRejected);
    void            NewSubgraph() throw(ERRejected)
                        {NewSubgraph(nMax*2);};
    void            ReleaseSubgraph() throw();

    TFloat          Sub(TArc a) throw(ERRange);
    void            AddArc(TArc a,TFloat Lambda) throw(ERRange,ERRejected);
    void            OmitArc(TArc a,TFloat Lambda) throw(ERRange,ERRejected);
    
};                           


#endif
