// Copyright (C) 1996 DIMACS Center, Rutgers, The State University of New Jersey
// Author(s): Patricia K. Fasel (Los Alamos Nat. Lab.), Jonathan Berry
// This software is copyrighted by the DIMACS Center at Rutgers, The State
// University of New Jersey.  IT IS PROVIDED AS IS, AND THE AUTHORS, DIMACS, AND
// RUTGERS, THE STATE UNIVERSITY OF NEW JERSEY  DISCLAIM
// ALL LIABILITY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
// DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
// DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
// THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
// IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
// NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
// MODIFICATIONS.
// The authors hereby grant permission to use, copy, modify, distribute,
// and license this software and its documentation for any purpose, provided
// that existing copyright notices are retained in all copies and that this
// notice is included verbatim in any distributions. No written agreement,
// license, or royalty fee is required for any of the authorized uses.
// Modifications to this software may be copyrighted by their authors
// and need not follow the licensing terms described here, provided that
// the new terms are clearly indicated on the first page of each file where
// they apply.
// Last File Update: 21-Feb-1998
// 
#include <LINK/basic/List.h>
#define DEFINE_Container_TEMPLATE
#define DEFINE_BinaryHeap_TEMPLATE
#define DEFINE_Deque_TEMPLATE
#define DEFINE_Queue_TEMPLATE
#define DEFINE_randomPermutation_TEMPLATE
#define DEFINE_Attribute_TEMPLATE
#define DEFINE_AttributeElementOps_TEMPLATE
#define DEFINE_RedBlackTree_TEMPLATE
#include <LINK/basic/Container.h>
#include <LINK/basic/BinaryHeap.h>
#include <LINK/basic/RedBlackTree.h>
#include <LINK/basic/Deque.h>
#include <LINK/basic/Queue.h>
#include <LINK/basic/Stack.h>
#include <LINK/basic/randomPermutation.h>
#include <LINK/graph/Attribute.h>
#include <LINK/graph/AttributeElementOps.h>
#undef  DEFINE_Container_TEMPLATE
#undef  DEFINE_BinaryHeap_TEMPLATE
#undef  DEFINE_Deque_TEMPLATE
#undef  DEFINE_Queue_TEMPLATE
#undef  DEFINE_Stack_TEMPLATE
#undef  DEFINE_randomPermutation_TEMPLATE
#undef  DEFINE_Attribute_TEMPLATE
#undef  DEFINE_AttributeElementOps_TEMPLATE
#undef  DEFINE_RedBlackTree_TEMPLATE
#include <LINK/basic/Set.h>
#include <LINK/basic/DJSet.h>
#include <LINK/basic/Sequence.h>
#include <LINK/graph/Vertex.h>
#include <LINK/graph/Edge.h>

ostream& AttributeElementOps<float>::displayItem(ostream& os,
                                                  const float& e) const;
ostream& AttributeElementOps<double>::displayItem(ostream& os,
                                                  const double& e) const;
ostream& AttributeElementOps<String>::displayItem(ostream& os,
                                                  const String& e) const;
typedef Vertex *VertexPtr;
ostream& AttributeElementOps<VertexPtr>::displayItem(ostream& os,
                                                const VertexPtr& v) const;
typedef Edge *EdgePtr;
ostream& AttributeElementOps<EdgePtr>::displayItem(ostream& os,
                                                const EdgePtr& e) const;

#ifdef __GNUC__
template class BinaryHeapNode<int,Edge*>;
template class BinaryHeapNode<int,Vertex*>;
template class BinaryHeapNode<double,Edge*>;
template class BinaryHeapNode<double,Vertex*>;
template class RedBlackTreeNode<int,Set<Vertex*>* >;
#endif
template class Dictionary<int,Edge*>;
template class Dictionary<int,Vertex*>;
template class Dictionary<double,Edge*>;
template class Dictionary<double,Vertex*>;
template class Dictionary<int,Set<Vertex*>* >;
template class BinaryHeap<int,Edge*>;
template class BinaryHeap<int,Vertex*>;
template class BinaryHeap<double,Edge*>;
template class BinaryHeap<double,Vertex*>;
template class RedBlackTree<int,Set<Vertex*>* >;
template class Deque<Vertex*>;
template class Queue<Vertex*>;
template class Stack<Vertex*>;
template ostream& operator<<(ostream&, const Deque<Vertex*>&);
template class Deque<Edge*>;
template class Queue<Edge*>;
template class Stack<Edge*>;
template ostream& operator<<(ostream&, const Deque<Edge*>&);
#include <LINK/basic/DList.h>
#include <LINK/graph/Graph.h>
template class AttributeElementOps<int>;
template class AttributeElementOps<char>;
template class AttributeElementOps<GraphObject*>;
template class AttributeElementOps<Graph*>;
template class AttributeElementOps<Vertex*>;
template class AttributeElementOps<Edge*>;
template class AttributeElementOps<List<Vertex*>*>;
template class AttributeElementOps<DList<Vertex*>*>;
template class AttributeElementOps<ContainerNode*>;
template class AttributeElementOps<DJSet*>;
template void randomPermutation(Sequence<Vertex*>*, int);
template void randomPermutation(Set<Vertex*>*, int);
template void randomPermutation(Vertex**, int);
ostream& AttributeElementOps<float>::displayItem(ostream& os,
                                                  const float& e) const
{
        os.setf(ios::showpoint);
        os << e << "f";
        return os;
}
ostream& AttributeElementOps<double>::displayItem(ostream& os,
                                                  const double& e) const
{
        os.setf(ios::showpoint);
        os << e;
        return os;
}
ostream& AttributeElementOps<String>::displayItem(ostream& os,
                                                  const String& e) const
{
        os << "\"" << e << "\"";
        return os;
}
typedef Vertex *VertexPtr;
ostream& AttributeElementOps<VertexPtr>::displayItem(ostream& os,
                                                const VertexPtr& v) const
{
	if (v) {
		os << *v;
	} else
		os << 0;
        return os;
}
typedef Edge *EdgePtr;
ostream& AttributeElementOps<EdgePtr>::displayItem(ostream& os,
                                                const EdgePtr& e) const
{
	if (e) {
        	os << *e;
	} else
		os << 0;
        return os;
}
