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


#if !defined(_DNSBIG_H_)

#define _DNSBIG_H_

#include <absbig.h>
#include <dnsstruc.h>


class denseBiGraph : public virtual abstractBiGraph
{
    friend class iDenseBiGraph;
    
protected:
        
    denseGraphStructure X;    

public:

    denseBiGraph(TNode nn1,TNode nn2,TOption options = 0,
        goblinController &thisContext = goblinDefaultContext) throw();
    denseBiGraph(char* impFileName,
        goblinController &thisContext = goblinDefaultContext)
        throw(ERFile,ERParse);
    denseBiGraph(abstractBiGraph &G) throw();
    ~denseBiGraph() throw();

    TArc            InsertArc(TNode u,TNode v) throw(ERRange,ERRejected);
    TArc            InsertArc(TNode u,TNode v,TCap cc,TCap bb,TFloat ll)
                        throw(ERRange,ERRejected);

    unsigned long   Size() throw();
    unsigned long   Allocated() throw();
    virtual objectType ClassID() throw() {return IDDenseBiGraph;};
    virtual void*   BackCast() {return (void*)this;};
    
    TArc            Adjacency(TNode u,TNode v) throw(ERRange);
    TNode           StartNode(TArc a) throw(ERRange);
    TNode           EndNode(TArc a) throw(ERRange);
   
    TArc            First(TNode v) throw(ERRange);
    TArc            Right(TArc a,TNode u) throw(ERRange);
         
    void            Write(char* fileName) throw(ERFile)
                        {WriteBiGraph(fileName,NO_INCIDENCES);};

    #include <dnsincl.h>

    TFloat          Length(TArc a) throw(ERRange) {return X.Length(a);};     

};                           


#endif
