Index: /GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility_internal.sh
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility_internal.sh	(revision 2130)
+++ /GTP/trunk/Lib/Vis/Preprocessing/scripts/preprocess_visibility_internal.sh	(revision 2162)
@@ -14,5 +14,5 @@
 
 #NUM_SAMPLE_RAYS=1000000000
-NUM_SAMPLE_RAYS=10000000
+NUM_SAMPLE_RAYS=20000000
 
 $PREPROCESSOR -total_samples=$NUM_SAMPLE_RAYS \
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj	(revision 2161)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor.vcproj	(revision 2162)
@@ -81,5 +81,5 @@
 				OptimizeForWindowsApplication="TRUE"
 				AdditionalIncludeDirectories="..\include;..\..\..\..\..\..\NonGTP\Boost;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\MultiLevelRayTracing;Timer"
-				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NO_QT"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;NO_QT;USE_VERBOSE_PVS"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/RayCaster.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/RayCaster.h	(revision 2161)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/RayCaster.h	(revision 2162)
@@ -89,5 +89,5 @@
 	void Reserve(const int number) {
 		cout<<"here3"<<endl;
-	//DEL_PTR(mRays);
+	DEL_PTR(mRays);
 	cout<<"here44"<<endl;
 	  mRays = new VssRay[number];
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/HashPvs.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/HashPvs.h	(revision 2161)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/HashPvs.h	(revision 2162)
@@ -8,4 +8,5 @@
 #include "PvsBase.h"
 #include "google/dense_hash_set"
+#include "google/dense_hash_map"
 
 
@@ -24,8 +25,16 @@
    };
 
-   size_t operator()(T a) const
+   /*int operator()(T a) const
    {
+	   if (!a)
+		   return -2;
 	   return (size_t)(a->GetId());
+   }*/
+
+   int operator()(int a) const
+   {
+	   return a;
    }
+
 
    bool operator()(T a, T b) const
@@ -36,5 +45,6 @@
 
 
-#define HASH_SET google::dense_hash_set<T, my_hash_compare<T> >
+//#define HASH_SET google::dense_hash_set<T, my_hash_compare<T> >
+#define HASH_SET google::dense_hash_map<int, T>//, hash_compare<int> >
 //#define HASH_SET stdext::hash_set<T, my_hash_compare<T> >
 #define HASH_ITERATOR HASH_SET::iterator
@@ -63,5 +73,5 @@
 	T Next(S &pdf)
 	{
-		T sample = *mItCurrent;
+		T sample = (*mItCurrent).second;
 		++ mItCurrent;
 
@@ -71,5 +81,5 @@
 	T Next()
 	{
-		T sample = *mItCurrent;
+		T sample = (*mItCurrent).second;
 		++ mItCurrent;
 
@@ -94,5 +104,10 @@
 
 	//HashPvs(): mEntries((Intersectable *)100) {};
-	HashPvs() {};
+	HashPvs() 
+	{
+		 mEntries.set_deleted_key(-1);
+		 mEntries.set_empty_key(-2);
+		 //mEntries.Reset();
+	};
 	//virtual ~HashPvs() {};
 
@@ -207,9 +222,8 @@
 bool HashPvs<T, S>::Find(T sample, typename HASH_ITERATOR &it)
 {
-	it = mEntries.find(sample);
+	it = mEntries.find(sample->GetId());
 
 	// already in map
 	return (it != mEntries.end());
-	return false;
 }
 
@@ -237,13 +251,6 @@
 		return 0.0f;
 	
-	mEntries.insert(sample);
+	mEntries.insert(pair<int, T>(sample->GetId(), sample));
 	return 1.0f;
-
-	/*pair<HASH_SET::iterator, bool> p = mEntries.insert(sample);
-
-	if (p.second)
-		return 0.0f;
-	else
-		return 1.0f;*/
 }
 	
@@ -257,8 +264,6 @@
 	if (!Find(sample, it))
 	{
-		mEntries.insert(sample);	
-	}
-
-	//pair<HASH_SET::iterator, bool> p = mEntries.insert(sample);
+		mEntries.insert(pair<int, T>(sample->GetId(), sample));
+	}
 }
 
@@ -268,16 +273,18 @@
 										const float pdf)
 {
-	/*pair<HASH_ITERATOR, bool> p = mEntries.insert(sample);
+	static CONST_HASH_ITERATOR it;
+
+	it = mEntries.find(sample->GetId());//, sample);
 
 	// already in map
-	return p.second;
-*/
-	static HASH_ITERATOR it;
+	const bool found = (it != mEntries.end());
 
 	// already in map
-	if (Find(sample, it))
+	if (found)
+	//if (Find(pair<int, T>(sample->GetId(), sample), it))
 		return false;
-	
-	mEntries.insert(sample);
+
+	mEntries.insert(pair<int, T>(sample->GetId(), sample));
+	
 	return true;
 }
@@ -375,5 +382,5 @@
 	for (ait = a.mEntries.begin(); ait != ait_end; ++ ait)
 	{
-		mergedPvs.AddSample(*ait, 1.0f);
+		mergedPvs.AddSample((*ait).second, 1.0f);
 	}
 
@@ -382,7 +389,6 @@
 	for (bit = b.mEntries.begin(); bit != bit_end; ++ bit)
 	{
-		mergedPvs.AddSample(*bit, 1.0f);
-	}
-
+		mergedPvs.AddSample((*bit).second, 1.0f);
+	}
 }
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj	(revision 2161)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj	(revision 2162)
@@ -72,5 +72,5 @@
 				OptimizeForWindowsApplication="TRUE"
 				AdditionalIncludeDirectories="..\include;..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;Timer"
-				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
+				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;USE_VERBOSE_PVS"
 				ExceptionHandling="TRUE"
 				RuntimeLibrary="2"
@@ -1151,17 +1151,32 @@
 			</File>
 			<File
+				RelativePath=".\sparsehash\src\google\dense_hash_map">
+			</File>
+			<File
+				RelativePath=".\sparsehash\src\google\dense_hash_set">
+			</File>
+			<File
 				RelativePath=".\sparsehash\src\google\sparsehash\densehashtable.h">
 			</File>
 			<File
+				RelativePath=".\sparsehash\src\google\sparsehash\hash_fun.h">
+			</File>
+			<File
 				RelativePath=".\sparsehash\src\windows\hash_fun.h">
 			</File>
 			<File
-				RelativePath=".\sparsehash\src\google\sparsehash\hash_fun.h">
-			</File>
-			<File
 				RelativePath=".\sparsehash\src\windows\hash_map.h">
 			</File>
 			<File
+				RelativePath=".\sparsehash\src\google\sparse_hash_map">
+			</File>
+			<File
+				RelativePath=".\sparsehash\src\google\sparse_hash_set">
+			</File>
+			<File
 				RelativePath=".\sparsehash\src\google\sparsehash\sparsehashtable.h">
+			</File>
+			<File
+				RelativePath=".\sparsehash\src\google\sparsetable">
 			</File>
 			<File
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/mkinstalldirs
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/mkinstalldirs	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/mkinstalldirs	(revision 2162)
@@ -0,0 +1,99 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+   case "${1}" in
+     -h | --help | --h* )			# -h for help
+	echo "${usage}" 1>&2; exit 0 ;;
+     -m )					# -m PERM arg
+	shift
+	test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
+	dirmode="${1}"
+	shift ;;
+     -- ) shift; break ;;			# stop option processing
+     -* ) echo "${usage}" 1>&2; exit 1 ;;	# unknown option
+     * )  break ;;				# first non-opt arg
+   esac
+done
+
+for file
+do
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
+case $# in
+0) exit 0 ;;
+esac
+
+case $dirmode in
+'')
+  if mkdir -p -- . 2>/dev/null; then
+    echo "mkdir -p -- $*"
+    exec mkdir -p -- "$@"
+  fi ;;
+*)
+  if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+    echo "mkdir -m $dirmode -p -- $*"
+    exec mkdir -m "$dirmode" -p -- "$@"
+  fi ;;
+esac
+
+for file
+do
+   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+   shift
+
+   pathcomp=
+   for d
+   do
+     pathcomp="$pathcomp$d"
+     case "$pathcomp" in
+       -* ) pathcomp=./$pathcomp ;;
+     esac
+
+     if test ! -d "$pathcomp"; then
+	echo "mkdir $pathcomp"
+
+	mkdir "$pathcomp" || lasterr=$?
+
+	if test ! -d "$pathcomp"; then
+	  errstatus=$lasterr
+	else
+	  if test ! -z "$dirmode"; then
+	     echo "chmod $dirmode $pathcomp"
+
+	     lasterr=""
+	     chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+	     if test ! -z "$lasterr"; then
+	       errstatus=$lasterr
+	     fi
+	  fi
+	fi
+     fi
+
+     pathcomp="$pathcomp/"
+   done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 3
+# End:
+# mkinstalldirs ends here
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/configure
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/configure	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/configure	(revision 2162)
@@ -0,0 +1,6333 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.57 for sparsehash 0.3.
+#
+# Report bugs to <opensource@google.com>.
+#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='sparsehash'
+PACKAGE_TARNAME='sparsehash'
+PACKAGE_VERSION='0.3'
+PACKAGE_STRING='sparsehash 0.3'
+PACKAGE_BUGREPORT='opensource@google.com'
+
+ac_unique_file="README"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE EGREP CXXCPP LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+              localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$0" : 'X\(//\)[^/]' \| \
+         X"$0" : 'X\(//\)$' \| \
+         X"$0" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+ac_env_CXXCPP_set=${CXXCPP+set}
+ac_env_CXXCPP_value=$CXXCPP
+ac_cv_env_CXXCPP_set=${CXXCPP+set}
+ac_cv_env_CXXCPP_value=$CXXCPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures sparsehash 0.3 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of sparsehash 0.3:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-dependency-tracking Speeds up one-time builds
+  --enable-dependency-tracking  Do not reject slow dependency extractors
+--enable-namespace=FOO to define these Google
+                             classes in the FOO namespace. --disable-namespace
+                             to define them in the global namespace. Default
+                             is to define them in std.
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CXXCPP      C++ preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <opensource@google.com>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+           test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+sparsehash configure 0.3
+generated by GNU Autoconf 2.57
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by sparsehash $as_me 0.3, which was
+generated by GNU Autoconf 2.57.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+        ac_must_keep_next=false # Got value, back to normal.
+      else
+        case $ac_arg in
+          *=* | --config-cache | -C | -disable-* | --disable-* \
+          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+          | -with-* | --with-* | -without-* | --without-* | --x)
+            case "$ac_configure_args0 " in
+              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+            esac
+            ;;
+          -* ) ac_must_keep_next=true ;;
+        esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+        echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core core.* *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+        ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# The argument here is just something that should be in the current directory
+# (for sanity checking)
+
+am__api_version="1.6"
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+          if test $ac_prog = install &&
+            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # AIX install.  It has an incompatible calling convention.
+            :
+          elif test $ac_prog = install &&
+            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # program-specific install script used by HP pwplus--don't use.
+            :
+          else
+            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+            break 3
+          fi
+        fi
+      done
+    done
+    ;;
+esac
+done
+
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+ # test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# Define the identity of the package.
+ PACKAGE=sparsehash
+ VERSION=0.3
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+
+
+
+# Add the stamp file to the list of files AC keeps track of,
+# along with our hook.
+          ac_config_headers="$ac_config_headers src/google/sparsehash/config.h"
+
+
+
+
+# Checks for programs.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+        ;;
+    conftest.$ac_ext )
+        # This is the source file.
+        ;;
+    [ab].out )
+        # We found the default executable, but exeext='' is most
+        # certainly right.
+        break;;
+    *.* )
+        ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+        # FIXME: I believe we export ac_cv_exeext for Libtool,
+        # but it would be cool to find out if it's true.  Does anybody
+        # maintain Libtool? --akim.
+        export ac_cv_exeext
+        break;;
+    * )
+        break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+          export ac_cv_exeext
+          break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   ''\
+   '#include <stdlib.h>' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+  DEPDIR=.deps
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  DEPDIR=_deps
+fi
+rmdir .deps 2>/dev/null
+
+
+          ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+	@echo done
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+
+depcc="$CC"   am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    echo '#include "conftest.h"' > conftest.c
+    echo 'int i;' > conftest.h
+    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=conftest.c object=conftest.o \
+       depfile=conftest.Po tmpdepfile=conftest.TPo \
+       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+       grep conftest.h conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      am_cv_CC_dependencies_compiler_type=$depmode
+      break
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+  CXX=$ac_ct_CXX
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+for ac_declaration in \
+   ''\
+   '#include <stdlib.h>' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    echo '#include "conftest.h"' > conftest.c
+    echo 'int i;' > conftest.h
+    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=conftest.c object=conftest.o \
+       depfile=conftest.Po tmpdepfile=conftest.TPo \
+       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+       grep conftest.h conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      am_cv_CXX_dependencies_compiler_type=$depmode
+      break
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+
+
+# Check whether some low-level functions/files are available
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                   (('a' <= (c) && (c) <= 'i') \
+                     || ('j' <= (c) && (c) <= 'r') \
+                     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+        || toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+
+
+for ac_func in memcpy memmove
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for u_int16_t" >&5
+echo $ECHO_N "checking for u_int16_t... $ECHO_C" >&6
+if test "${ac_cv_type_u_int16_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((u_int16_t *) 0)
+  return 0;
+if (sizeof (u_int16_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_u_int16_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_u_int16_t=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_u_int16_t" >&5
+echo "${ECHO_T}$ac_cv_type_u_int16_t" >&6
+if test $ac_cv_type_u_int16_t = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_U_INT16_T 1
+_ACEOF
+
+
+fi
+    # defined in most posix systems
+echo "$as_me:$LINENO: checking for __uint16" >&5
+echo $ECHO_N "checking for __uint16... $ECHO_C" >&6
+if test "${ac_cv_type___uint16+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((__uint16 *) 0)
+  return 0;
+if (sizeof (__uint16))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type___uint16=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type___uint16=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type___uint16" >&5
+echo "${ECHO_T}$ac_cv_type___uint16" >&6
+if test $ac_cv_type___uint16 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE___UINT16 1
+_ACEOF
+
+
+fi
+     # defined in some windows systems (vc7)
+# These are 'only' needed for unittests
+
+
+
+
+for ac_header in sys/resource.h unistd.h sys/time.h sys/utsname.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# Writes the header files for hash_map, hash_set, and hash_fun into .
+# This also tells us what namespace hash code lives in.
+
+echo "$as_me:$LINENO: checking whether the compiler implements namespaces" >&5
+echo $ECHO_N "checking whether the compiler implements namespaces... $ECHO_C" >&6
+if test "${ac_cv_cxx_namespaces+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+namespace Outer { namespace Inner { int i = 0; }}
+int
+main ()
+{
+using namespace Outer::Inner; return i;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_cxx_namespaces=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_cxx_namespaces=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_namespaces" >&5
+echo "${ECHO_T}$ac_cv_cxx_namespaces" >&6
+if test "$ac_cv_cxx_namespaces" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NAMESPACES
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking location of STL hash_map" >&5
+echo $ECHO_N "checking location of STL hash_map... $ECHO_C" >&6
+if test "${ac_cv_cxx_stl_hash+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+      ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+      cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <hash_map>
+int
+main ()
+{
+hash_map<int, int> t; return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_cxx_stl_hash=hash_map
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+      cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ext/hash_map>
+int
+main ()
+{
+__gnu_cxx::hash_map<int, int> t; return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_cxx_stl_hash=ext_hash_map
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+      cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <hash_map>
+int
+main ()
+{
+std::hash_map<int, int> t; return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_cxx_stl_hash=std_hash_map
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+      cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <hash_map>
+int
+main ()
+{
+stdext::hash_map<int, int> t; return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_cxx_stl_hash=stdext_hash_map
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_stl_hash" >&5
+echo "${ECHO_T}$ac_cv_cxx_stl_hash" >&6
+   if test "$ac_cv_cxx_stl_hash" = hash_map; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HASH_MAP 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HASH_SET 1
+_ACEOF
+
+      ac_cv_cxx_hash_map="<hash_map>"
+      ac_cv_cxx_hash_set="<hash_set>"
+      ac_cv_cxx_hash_namespace=""
+   fi
+   if test "$ac_cv_cxx_stl_hash" = ext_hash_map; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXT_HASH_MAP 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_EXT_HASH_SET 1
+_ACEOF
+
+      ac_cv_cxx_hash_map="<ext/hash_map>"
+      ac_cv_cxx_hash_set="<ext/hash_set>"
+      ac_cv_cxx_hash_namespace="__gnu_cxx"
+   fi
+   if test "$ac_cv_cxx_stl_hash" = std_hash_map; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HASH_MAP 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HASH_SET 1
+_ACEOF
+
+      ac_cv_cxx_hash_map="<hash_map>"
+      ac_cv_cxx_hash_set="<hash_set>"
+      ac_cv_cxx_hash_namespace="std"
+   fi
+   if test "$ac_cv_cxx_stl_hash" = stdext_hash_map; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HASH_MAP 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HASH_SET 1
+_ACEOF
+
+      ac_cv_cxx_hash_map="<hash_map>"
+      ac_cv_cxx_hash_set="<hash_set>"
+      ac_cv_cxx_hash_namespace="stdext"
+   fi
+
+cat >>confdefs.h <<_ACEOF
+#define HASH_NAMESPACE $ac_cv_cxx_hash_namespace
+_ACEOF
+
+
+   if test x"$ac_cv_cxx_stl_hash" = x; then
+      { { echo "$as_me:$LINENO: error: couldn't find an STL hash_map" >&5
+echo "$as_me: error: couldn't find an STL hash_map" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+
+   echo "$as_me:$LINENO: checking writing a helper file for including hash_map" >&5
+echo $ECHO_N "checking writing a helper file for including hash_map... $ECHO_C" >&6
+
+   { if $as_mkdir_p; then
+    mkdir -p `(dirname src/hash_map.h) 2>/dev/null ||
+$as_expr Xsrc/hash_map.h : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         Xsrc/hash_map.h : 'X\(//\)[^/]' \| \
+         Xsrc/hash_map.h : 'X\(//\)$' \| \
+         Xsrc/hash_map.h : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo Xsrc/hash_map.h |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  else
+    as_dir=`(dirname src/hash_map.h) 2>/dev/null ||
+$as_expr Xsrc/hash_map.h : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         Xsrc/hash_map.h : 'X\(//\)[^/]' \| \
+         Xsrc/hash_map.h : 'X\(//\)$' \| \
+         Xsrc/hash_map.h : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo Xsrc/hash_map.h |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$as_dir" : 'X\(//\)[^/]' \| \
+         X"$as_dir" : 'X\(//\)$' \| \
+         X"$as_dir" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \`(dirname src/hash_map.h) 2>/dev/null ||
+$as_expr Xsrc/hash_map.h : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         Xsrc/hash_map.h : 'X\(//\)[^/]' \| \
+         Xsrc/hash_map.h : 'X\(//\)$' \| \
+         Xsrc/hash_map.h : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo Xsrc/hash_map.h |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'\`" >&5
+echo "$as_me: error: cannot create directory \`(dirname src/hash_map.h) 2>/dev/null ||
+$as_expr Xsrc/hash_map.h : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         Xsrc/hash_map.h : 'X\(//\)[^/]' \| \
+         Xsrc/hash_map.h : 'X\(//\)$' \| \
+         Xsrc/hash_map.h : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo Xsrc/hash_map.h |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'\`" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+   cat >src/hash_map.h <<EOF
+#include $ac_cv_cxx_hash_map
+#ifndef HASH_NAMESPACE
+#define HASH_NAMESPACE $ac_cv_cxx_hash_namespace
+#endif
+EOF
+
+   echo "$as_me:$LINENO: result: src/hash_map.h" >&5
+echo "${ECHO_T}src/hash_map.h" >&6
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+
+
+   ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+
+
+
+for ac_header in stl_hash_fun.h ext/stl_hash_fun.h \
+                    ext/hash_fun.h hash_fun.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf@gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ ac_cv_cxx_stl_hash_fun="<$ac_header>"; break
+fi
+
+done
+
+   ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+   echo "$as_me:$LINENO: checking how to include hash_fun directly" >&5
+echo $ECHO_N "checking how to include hash_fun directly... $ECHO_C" >&6
+   echo "$as_me:$LINENO: result: $ac_cv_cxx_stl_hash_fun" >&5
+echo "${ECHO_T}$ac_cv_cxx_stl_hash_fun" >&6
+
+
+
+   echo "$as_me:$LINENO: checking writing an include-helper for hash_fun.h" >&5
+echo $ECHO_N "checking writing an include-helper for hash_fun.h... $ECHO_C" >&6
+
+   { if $as_mkdir_p; then
+    mkdir -p `(dirname src/google/sparsehash/hash_fun.h) 2>/dev/null ||
+$as_expr Xsrc/google/sparsehash/hash_fun.h : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         Xsrc/google/sparsehash/hash_fun.h : 'X\(//\)[^/]' \| \
+         Xsrc/google/sparsehash/hash_fun.h : 'X\(//\)$' \| \
+         Xsrc/google/sparsehash/hash_fun.h : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo Xsrc/google/sparsehash/hash_fun.h |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  else
+    as_dir=`(dirname src/google/sparsehash/hash_fun.h) 2>/dev/null ||
+$as_expr Xsrc/google/sparsehash/hash_fun.h : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         Xsrc/google/sparsehash/hash_fun.h : 'X\(//\)[^/]' \| \
+         Xsrc/google/sparsehash/hash_fun.h : 'X\(//\)$' \| \
+         Xsrc/google/sparsehash/hash_fun.h : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo Xsrc/google/sparsehash/hash_fun.h |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$as_dir" : 'X\(//\)[^/]' \| \
+         X"$as_dir" : 'X\(//\)$' \| \
+         X"$as_dir" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \`(dirname src/google/sparsehash/hash_fun.h) 2>/dev/null ||
+$as_expr Xsrc/google/sparsehash/hash_fun.h : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         Xsrc/google/sparsehash/hash_fun.h : 'X\(//\)[^/]' \| \
+         Xsrc/google/sparsehash/hash_fun.h : 'X\(//\)$' \| \
+         Xsrc/google/sparsehash/hash_fun.h : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo Xsrc/google/sparsehash/hash_fun.h |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'\`" >&5
+echo "$as_me: error: cannot create directory \`(dirname src/google/sparsehash/hash_fun.h) 2>/dev/null ||
+$as_expr Xsrc/google/sparsehash/hash_fun.h : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         Xsrc/google/sparsehash/hash_fun.h : 'X\(//\)[^/]' \| \
+         Xsrc/google/sparsehash/hash_fun.h : 'X\(//\)$' \| \
+         Xsrc/google/sparsehash/hash_fun.h : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo Xsrc/google/sparsehash/hash_fun.h |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'\`" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+   cat >src/google/sparsehash/hash_fun.h <<EOF
+#ifndef HASH_NAMESPACE
+#define HASH_NAMESPACE $ac_cv_cxx_hash_namespace
+#endif
+
+EOF
+   if test -n "$ac_cv_cxx_stl_hash_fun"; then
+     echo "#include $ac_cv_cxx_stl_hash_fun" >> src/google/sparsehash/hash_fun.h
+   else
+     cat $srcdir/src/windows/stl_hash_fun.h >> src/google/sparsehash/hash_fun.h
+   fi
+
+   echo "$as_me:$LINENO: result: src/google/sparsehash/hash_fun.h" >&5
+echo "${ECHO_T}src/google/sparsehash/hash_fun.h" >&6
+
+
+# Find out what namespace 'normal' STL code lives in, and also what namespace
+# the user wants our classes to be defined in
+echo "$as_me:$LINENO: checking what namespace STL code is in" >&5
+echo $ECHO_N "checking what namespace STL code is in... $ECHO_C" >&6
+if test "${ac_cv_cxx_stl_namespace+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+      ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+      cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <vector>
+int
+main ()
+{
+vector<int> t; return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_cxx_stl_namespace=none
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+      cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <vector>
+int
+main ()
+{
+std::vector<int> t; return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_cxx_stl_namespace=std
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_stl_namespace" >&5
+echo "${ECHO_T}$ac_cv_cxx_stl_namespace" >&6
+   if test "$ac_cv_cxx_stl_namespace" = none; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STL_NAMESPACE
+_ACEOF
+
+   fi
+   if test "$ac_cv_cxx_stl_namespace" = std; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STL_NAMESPACE std
+_ACEOF
+
+   fi
+
+google_namespace_default=google
+   # Check whether --enable-namespace or --disable-namespace was given.
+if test "${enable_namespace+set}" = set; then
+  enableval="$enable_namespace"
+  case "$enableval" in
+                    yes) google_namespace="$google_namespace_default" ;;
+                     no) google_namespace="" ;;
+                      *) google_namespace="$enableval" ;;
+                  esac
+else
+  google_namespace="$google_namespace_default"
+fi;
+   if test -n "$google_namespace"; then
+
+cat >>confdefs.h <<_ACEOF
+#define GOOGLE_NAMESPACE $google_namespace
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _START_GOOGLE_NAMESPACE_  namespace GOOGLE_NAMESPACE {
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _END_GOOGLE_NAMESPACE_  }
+_ACEOF
+
+   else
+
+cat >>confdefs.h <<\_ACEOF
+#define GOOGLE_NAMESPACE
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _START_GOOGLE_NAMESPACE_
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _END_GOOGLE_NAMESPACE_
+_ACEOF
+
+   fi
+
+
+# Check what STL features are defined
+echo "$as_me:$LINENO: checking whether STL supports iterator-tags" >&5
+echo $ECHO_N "checking whether STL supports iterator-tags... $ECHO_C" >&6
+if test "${ac_cv_cxx_stl_iterator_tags+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+
+       ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <list>
+int
+main ()
+{
+list<int>::iterator::iterator_category c; return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_cxx_stl_iterator_tags=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+       cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <list>
+int
+main ()
+{
+std::list<int>::iterator::iterator_category c; return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_cxx_stl_iterator_tags=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+       ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_stl_iterator_tags" >&5
+echo "${ECHO_T}$ac_cv_cxx_stl_iterator_tags" >&6
+   if test "$ac_cv_cxx_stl_iterator_tags" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define UNDERSTANDS_ITERATOR_TAGS 1
+_ACEOF
+
+   fi
+
+
+# TODO(csilvers): turn on again once we decide whether we want to enforce
+#                 DECLARE_POD with the hash types
+#AC_CXX_STL_TYPE_TRAITS
+
+# Write generated configuration file
+          ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+        "s/'/'\\\\''/g;
+    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ 	]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ 	]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by sparsehash $as_me 0.3, which was
+generated by GNU Autoconf 2.57.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+sparsehash config.status 0.3
+configured by $0, generated by GNU Autoconf 2.57,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+  "src/google/sparsehash/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/google/sparsehash/config.h" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@PACKAGE@,$PACKAGE,;t t
+s,@VERSION@,$VERSION,;t t
+s,@ACLOCAL@,$ACLOCAL,;t t
+s,@AUTOCONF@,$AUTOCONF,;t t
+s,@AUTOMAKE@,$AUTOMAKE,;t t
+s,@AUTOHEADER@,$AUTOHEADER,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@AMTAR@,$AMTAR,;t t
+s,@install_sh@,$install_sh,;t t
+s,@STRIP@,$STRIP,;t t
+s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s,@AWK@,$AWK,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@DEPDIR@,$DEPDIR,;t t
+s,@am__include@,$am__include,;t t
+s,@am__quote@,$am__quote,;t t
+s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s,@CCDEPMODE@,$CCDEPMODE,;t t
+s,@CPP@,$CPP,;t t
+s,@CXX@,$CXX,;t t
+s,@CXXFLAGS@,$CXXFLAGS,;t t
+s,@ac_ct_CXX@,$ac_ct_CXX,;t t
+s,@CXXDEPMODE@,$CXXDEPMODE,;t t
+s,@EGREP@,$EGREP,;t t
+s,@CXXCPP@,$CXXCPP,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_file" : 'X\(//\)[^/]' \| \
+         X"$ac_file" : 'X\(//\)$' \| \
+         X"$ac_file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$as_dir" : 'X\(//\)[^/]' \| \
+         X"$as_dir" : 'X\(//\)$' \| \
+         X"$as_dir" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  esac
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+                                     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
+ac_dB='[ 	].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	(][^ 	(]*\)\(([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_file" : 'X\(//\)[^/]' \| \
+         X"$ac_file" : 'X\(//\)$' \| \
+         X"$ac_file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$as_dir" : 'X\(//\)[^/]' \| \
+         X"$as_dir" : 'X\(//\)$' \| \
+         X"$as_dir" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+  # Run the commands associated with the file.
+  case $ac_file in
+    src/google/sparsehash/config.h ) # update the timestamp
+echo 'timestamp for src/google/sparsehash/config.h' >"src/google/sparsehash/stamp-h1"
+ ;;
+  esac
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_dest" : 'X\(//\)[^/]' \| \
+         X"$ac_dest" : 'X\(//\)$' \| \
+         X"$ac_dest" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+  case $ac_dest in
+    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`(dirname "$mf") 2>/dev/null ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$mf" : 'X\(//\)[^/]' \| \
+         X"$mf" : 'X\(//\)$' \| \
+         X"$mf" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  else
+    continue
+  fi
+  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # We invoke sed twice because it is the simplest approach to
+  # changing $(DEPDIR) to its actual value in the expansion.
+  for file in `sed -n -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+	s/\\\\$//
+	p
+	n
+	/\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`(dirname "$file") 2>/dev/null ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$file" : 'X\(//\)[^/]' \| \
+         X"$file" : 'X\(//\)$' \| \
+         X"$file" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    { if $as_mkdir_p; then
+    mkdir -p $dirpart/$fdir
+  else
+    as_dir=$dirpart/$fdir
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$as_dir" : 'X\(//\)[^/]' \| \
+         X"$as_dir" : 'X\(//\)$' \| \
+         X"$as_dir" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+  esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/Makefile.in
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/Makefile.in	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/Makefile.in	(revision 2162)
@@ -0,0 +1,695 @@
+# Makefile.in generated by automake 1.6.3 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+CPP = @CPP@
+CXX = @CXX@
+DEPDIR = @DEPDIR@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+PACKAGE = @PACKAGE@
+STRIP = @STRIP@
+VERSION = @VERSION@
+am__include = @am__include@
+am__quote = @am__quote@
+install_sh = @install_sh@
+
+# Make sure that when we re-make ./configure, we get the macros we need
+ACLOCAL_AMFLAGS = -I `pwd`/../autoconf
+
+# This is so we can #include <google/foo>
+AM_CPPFLAGS = -I$(top_srcdir)/src
+
+googleincludedir = $(includedir)/google
+googleinclude_HEADERS = \
+   src/google/dense_hash_map			\
+   src/google/dense_hash_set			\
+   src/google/sparse_hash_map			\
+   src/google/sparse_hash_set			\
+   src/google/sparsetable
+
+
+docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
+dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \
+   doc/dense_hash_map.html			\
+   doc/dense_hash_set.html			\
+   doc/sparse_hash_map.html			\
+   doc/sparse_hash_set.html			\
+   doc/sparsetable.html                     	\
+   doc/implementation.html			\
+   doc/performance.html
+
+
+lib_LTLIBRARIES = 
+
+TESTS = sparsetable_unittest hashtable_unittest
+check_SCRIPTS = 
+TESTS_ENVIRONMENT = 
+
+noinst_PROGRAMS = $(TESTS) time_hash_map
+
+# This doesn't include the config.h file, but everything else we make
+configure_generated_h_files = \
+   src/google/sparsehash/hash_fun.h		\
+   src/hash_map.h
+
+
+sparsehashincludedir = $(googleincludedir)/sparsehash
+sparsehashinclude_HEADERS = \
+   src/google/sparsehash/hash_fun.h		\
+   src/google/sparsehash/densehashtable.h	\
+   src/google/sparsehash/sparsehashtable.h	\
+   src/google/sparsehash/config.h
+
+
+sparsetable_unittest_SOURCES = \
+   src/sparsetable_unittest.cc			\
+   src/google/sparsehash/config.h		\
+   src/google/sparsetable			\
+   src/sparsetable_unittest.expected
+
+
+hashtable_unittest_SOURCES = \
+   src/hashtable_unittest.cc			\
+   $(googleinclude_HEADERS)			\
+   $(sparsehashinclude_HEADERS)			\
+   src/words
+
+
+time_hash_map_SOURCES = \
+   src/time_hash_map.cc				\
+   src/google/sparsehash/config.h		\
+   src/hash_map.h				\
+   $(googleinclude_HEADERS)
+
+
+EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \
+             src/config.h.include src/windows experimental
+
+
+DISTCLEANFILES = $(configure_generated_h_files)
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/src/google/sparsehash/config.h
+CONFIG_CLEAN_FILES =
+LTLIBRARIES = $(lib_LTLIBRARIES)
+
+noinst_PROGRAMS = sparsetable_unittest$(EXEEXT) \
+	hashtable_unittest$(EXEEXT) time_hash_map$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+
+am__objects_1 =
+am_hashtable_unittest_OBJECTS = hashtable_unittest.$(OBJEXT) \
+	$(am__objects_1) $(am__objects_1)
+hashtable_unittest_OBJECTS = $(am_hashtable_unittest_OBJECTS)
+hashtable_unittest_LDADD = $(LDADD)
+hashtable_unittest_DEPENDENCIES =
+hashtable_unittest_LDFLAGS =
+am_sparsetable_unittest_OBJECTS = sparsetable_unittest.$(OBJEXT)
+sparsetable_unittest_OBJECTS = $(am_sparsetable_unittest_OBJECTS)
+sparsetable_unittest_LDADD = $(LDADD)
+sparsetable_unittest_DEPENDENCIES =
+sparsetable_unittest_LDFLAGS =
+am_time_hash_map_OBJECTS = time_hash_map.$(OBJEXT) $(am__objects_1)
+time_hash_map_OBJECTS = $(am_time_hash_map_OBJECTS)
+time_hash_map_LDADD = $(LDADD)
+time_hash_map_DEPENDENCIES =
+time_hash_map_LDFLAGS =
+
+DEFS = @DEFS@
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/src/google/sparsehash
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/hashtable_unittest.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/sparsetable_unittest.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/time_hash_map.Po
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+CXXFLAGS = @CXXFLAGS@
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(hashtable_unittest_SOURCES) \
+	$(sparsetable_unittest_SOURCES) $(time_hash_map_SOURCES)
+DATA = $(dist_doc_DATA)
+
+HEADERS = $(googleinclude_HEADERS) $(sparsehashinclude_HEADERS)
+
+DIST_COMMON = README $(dist_doc_DATA) $(googleinclude_HEADERS) \
+	$(sparsehashinclude_HEADERS) \
+	./src/google/sparsehash/config.h.in AUTHORS COPYING ChangeLog \
+	INSTALL Makefile.am Makefile.in NEWS TODO aclocal.m4 compile \
+	config.guess config.sub configure configure.ac depcomp \
+	install-sh missing mkinstalldirs
+SOURCES = $(hashtable_unittest_SOURCES) $(sparsetable_unittest_SOURCES) $(time_hash_map_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .o .obj
+
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
+
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+$(srcdir)/configure:  $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+	cd $(srcdir) && $(AUTOCONF)
+
+$(ACLOCAL_M4):  configure.ac 
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+src/google/sparsehash/config.h: src/google/sparsehash/stamp-h1
+	@if test ! -f $@; then \
+	  rm -f src/google/sparsehash/stamp-h1; \
+	  $(MAKE) src/google/sparsehash/stamp-h1; \
+	else :; fi
+
+src/google/sparsehash/stamp-h1: $(srcdir)/./src/google/sparsehash/config.h.in $(top_builddir)/config.status
+	@rm -f src/google/sparsehash/stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status src/google/sparsehash/config.h
+
+$(srcdir)/./src/google/sparsehash/config.h.in:  $(top_srcdir)/configure.ac $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOHEADER)
+	touch $(srcdir)/./src/google/sparsehash/config.h.in
+
+distclean-hdr:
+	-rm -f src/google/sparsehash/config.h src/google/sparsehash/stamp-h1
+libLTLIBRARIES_INSTALL = $(INSTALL)
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f="`echo $$p | sed -e 's|^.*/||'`"; \
+	    echo " $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f"; \
+	    $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libdir)/$$f; \
+	  else :; fi; \
+	done
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	    p="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(libdir)/$$p"; \
+	  rm -f $(DESTDIR)$(libdir)/$$p; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+	  test -z "$dir" && dir=.; \
+	  echo "rm -f \"$${dir}/so_locations\""; \
+	  rm -f "$${dir}/so_locations"; \
+	done
+
+clean-noinstPROGRAMS:
+	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+hashtable_unittest.$(OBJEXT): src/hashtable_unittest.cc
+hashtable_unittest$(EXEEXT): $(hashtable_unittest_OBJECTS) $(hashtable_unittest_DEPENDENCIES) 
+	@rm -f hashtable_unittest$(EXEEXT)
+	$(CXXLINK) $(hashtable_unittest_LDFLAGS) $(hashtable_unittest_OBJECTS) $(hashtable_unittest_LDADD) $(LIBS)
+sparsetable_unittest.$(OBJEXT): src/sparsetable_unittest.cc
+sparsetable_unittest$(EXEEXT): $(sparsetable_unittest_OBJECTS) $(sparsetable_unittest_DEPENDENCIES) 
+	@rm -f sparsetable_unittest$(EXEEXT)
+	$(CXXLINK) $(sparsetable_unittest_LDFLAGS) $(sparsetable_unittest_OBJECTS) $(sparsetable_unittest_LDADD) $(LIBS)
+time_hash_map.$(OBJEXT): src/time_hash_map.cc
+time_hash_map$(EXEEXT): $(time_hash_map_OBJECTS) $(time_hash_map_DEPENDENCIES) 
+	@rm -f time_hash_map$(EXEEXT)
+	$(CXXLINK) $(time_hash_map_LDFLAGS) $(time_hash_map_OBJECTS) $(time_hash_map_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hashtable_unittest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparsetable_unittest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time_hash_map.Po@am__quote@
+
+distclean-depend:
+	-rm -rf ./$(DEPDIR)
+
+.cc.o:
+@AMDEP_TRUE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+
+.cc.obj:
+@AMDEP_TRUE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(CXXCOMPILE) -c -o $@ `cygpath -w $<`
+
+hashtable_unittest.o: src/hashtable_unittest.cc
+@AMDEP_TRUE@	source='src/hashtable_unittest.cc' object='hashtable_unittest.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/hashtable_unittest.Po' tmpdepfile='$(DEPDIR)/hashtable_unittest.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o hashtable_unittest.o `test -f 'src/hashtable_unittest.cc' || echo '$(srcdir)/'`src/hashtable_unittest.cc
+
+hashtable_unittest.obj: src/hashtable_unittest.cc
+@AMDEP_TRUE@	source='src/hashtable_unittest.cc' object='hashtable_unittest.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/hashtable_unittest.Po' tmpdepfile='$(DEPDIR)/hashtable_unittest.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o hashtable_unittest.obj `cygpath -w src/hashtable_unittest.cc`
+
+sparsetable_unittest.o: src/sparsetable_unittest.cc
+@AMDEP_TRUE@	source='src/sparsetable_unittest.cc' object='sparsetable_unittest.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/sparsetable_unittest.Po' tmpdepfile='$(DEPDIR)/sparsetable_unittest.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sparsetable_unittest.o `test -f 'src/sparsetable_unittest.cc' || echo '$(srcdir)/'`src/sparsetable_unittest.cc
+
+sparsetable_unittest.obj: src/sparsetable_unittest.cc
+@AMDEP_TRUE@	source='src/sparsetable_unittest.cc' object='sparsetable_unittest.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/sparsetable_unittest.Po' tmpdepfile='$(DEPDIR)/sparsetable_unittest.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sparsetable_unittest.obj `cygpath -w src/sparsetable_unittest.cc`
+
+time_hash_map.o: src/time_hash_map.cc
+@AMDEP_TRUE@	source='src/time_hash_map.cc' object='time_hash_map.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/time_hash_map.Po' tmpdepfile='$(DEPDIR)/time_hash_map.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o time_hash_map.o `test -f 'src/time_hash_map.cc' || echo '$(srcdir)/'`src/time_hash_map.cc
+
+time_hash_map.obj: src/time_hash_map.cc
+@AMDEP_TRUE@	source='src/time_hash_map.cc' object='time_hash_map.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@	depfile='$(DEPDIR)/time_hash_map.Po' tmpdepfile='$(DEPDIR)/time_hash_map.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o time_hash_map.obj `cygpath -w src/time_hash_map.cc`
+CXXDEPMODE = @CXXDEPMODE@
+uninstall-info-am:
+dist_docDATA_INSTALL = $(INSTALL_DATA)
+install-dist_docDATA: $(dist_doc_DATA)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(docdir)
+	@list='$(dist_doc_DATA)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(dist_docDATA_INSTALL) $$d$$p $(DESTDIR)$(docdir)/$$f"; \
+	  $(dist_docDATA_INSTALL) $$d$$p $(DESTDIR)$(docdir)/$$f; \
+	done
+
+uninstall-dist_docDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_doc_DATA)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(docdir)/$$f"; \
+	  rm -f $(DESTDIR)$(docdir)/$$f; \
+	done
+googleincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+install-googleincludeHEADERS: $(googleinclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(googleincludedir)
+	@list='$(googleinclude_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(googleincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(googleincludedir)/$$f"; \
+	  $(googleincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(googleincludedir)/$$f; \
+	done
+
+uninstall-googleincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(googleinclude_HEADERS)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(googleincludedir)/$$f"; \
+	  rm -f $(DESTDIR)$(googleincludedir)/$$f; \
+	done
+sparsehashincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+install-sparsehashincludeHEADERS: $(sparsehashinclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(sparsehashincludedir)
+	@list='$(sparsehashinclude_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(sparsehashincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(sparsehashincludedir)/$$f"; \
+	  $(sparsehashincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(sparsehashincludedir)/$$f; \
+	done
+
+uninstall-sparsehashincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(sparsehashinclude_HEADERS)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(sparsehashincludedir)/$$f"; \
+	  rm -f $(DESTDIR)$(sparsehashincludedir)/$$f; \
+	done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list='$(TESTS)'; \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *" $$tst "*) \
+	        xpass=`expr $$xpass + 1`; \
+	        failed=`expr $$failed + 1`; \
+	        echo "XPASS: $$tst"; \
+	      ;; \
+	      *) \
+	        echo "PASS: $$tst"; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *" $$tst "*) \
+	        xfail=`expr $$xfail + 1`; \
+	        echo "XFAIL: $$tst"; \
+	      ;; \
+	      *) \
+	        failed=`expr $$failed + 1`; \
+	        echo "FAIL: $$tst"; \
+	      ;; \
+	      esac; \
+	    fi; \
+	  done; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="All $$all tests passed"; \
+	    else \
+	      banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+	    fi; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all tests failed"; \
+	    else \
+	      banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+	    fi; \
+	  fi; \
+	  dashes=`echo "$$banner" | sed s/./=/g`; \
+	  echo "$$dashes"; \
+	  echo "$$banner"; \
+	  echo "$$dashes"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = .
+distdir = $(PACKAGE)-$(VERSION)
+
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
+
+GZIP_ENV = --best
+distcleancheck_listfiles = find . -type f -print
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	mkdir $(distdir)
+	$(mkinstalldirs) $(distdir)/./src/google/sparsehash $(distdir)/doc $(distdir)/packages $(distdir)/packages/rpm $(distdir)/src $(distdir)/src/google $(distdir)/src/google/sparsehash
+	@list='$(DISTFILES)'; for file in $$list; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist-gzip: distdir
+	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	$(am__remove_distdir)
+	GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/=build
+	mkdir $(distdir)/=inst
+	chmod a-w $(distdir)
+	dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
+	  && cd $(distdir)/=build \
+	  && ../configure --srcdir=.. --prefix=$$dc_install_base \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
+	      || { echo "ERROR: files left after uninstall:" ; \
+	           find $$dc_install_base -type f -print ; \
+	           exit 1; } >&2 ) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
+	  && rm -f $(distdir).tar.gz \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	$(am__remove_distdir)
+	@echo "$(distdir).tar.gz is ready for distribution" | \
+	  sed 'h;s/./=/g;p;x;p;x'
+distcleancheck: distclean
+	if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS)
+	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS)
+
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(docdir) $(DESTDIR)$(googleincludedir) $(DESTDIR)$(sparsehashincludedir)
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-noinstPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+distclean-am: clean-am distclean-compile distclean-depend \
+	distclean-generic distclean-hdr distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_docDATA install-googleincludeHEADERS \
+	install-sparsehashincludeHEADERS
+
+install-exec-am: install-libLTLIBRARIES
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf autom4te.cache
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+uninstall-am: uninstall-dist_docDATA uninstall-googleincludeHEADERS \
+	uninstall-info-am uninstall-libLTLIBRARIES \
+	uninstall-sparsehashincludeHEADERS
+
+.PHONY: GTAGS all all-am check check-TESTS check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-noinstPROGRAMS dist dist-all \
+	dist-gzip distcheck distclean distclean-compile \
+	distclean-depend distclean-generic distclean-hdr distclean-tags \
+	distcleancheck distdir dvi dvi-am info info-am install \
+	install-am install-data install-data-am install-dist_docDATA \
+	install-exec install-exec-am install-googleincludeHEADERS \
+	install-info install-info-am install-libLTLIBRARIES install-man \
+	install-sparsehashincludeHEADERS install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic tags uninstall uninstall-am \
+	uninstall-dist_docDATA uninstall-googleincludeHEADERS \
+	uninstall-info-am uninstall-libLTLIBRARIES \
+	uninstall-sparsehashincludeHEADERS
+
+
+rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec
+	@cd packages && ./rpm.sh ${PACKAGE} ${VERSION}
+
+deb: dist-gzip packages/deb.sh packages/deb/*
+	@cd packages && ./deb.sh ${PACKAGE} ${VERSION}
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/AUTHORS
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/AUTHORS	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/AUTHORS	(revision 2162)
@@ -0,0 +1,2 @@
+opensource@google.com
+
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/time_hash_map.cc
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/time_hash_map.cc	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/time_hash_map.cc	(revision 2162)
@@ -0,0 +1,308 @@
+// Copyright (c) 2005, Google Inc.
+// All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+// 
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+// 
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// ---
+// Authors: Sanjay Ghemawat and Craig Silverstein
+//
+// Time various hash map implementations
+//
+// See PERFORMANCE for the output of one example run.
+
+#include <google/sparsehash/config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+extern "C" {
+#include <time.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+#ifdef HAVE_SYS_UTSNAME_H
+#include <sys/utsname.h>      // for uname()
+#endif
+}
+
+// The functions that we call on each map, that differ for different types.
+// By default each is a noop, but we redefine them for types that need them.
+
+#include <map>
+#include "hash_map.h"
+#include <google/sparse_hash_map>
+#include <google/dense_hash_map>
+
+using GOOGLE_NAMESPACE::sparse_hash_map;
+using GOOGLE_NAMESPACE::dense_hash_map;
+using HASH_NAMESPACE::hash_map;
+using STL_NAMESPACE::map;
+
+// Normally I don't like non-const references, but using them here ensures
+// the inlined code ends up as efficient as possible.
+
+template<class MapType> inline void SET_DELETED_KEY(MapType& map, int key) {}
+template<class MapType> inline void SET_EMPTY_KEY(MapType& map, int key) {}
+template<class MapType> inline void RESIZE(MapType& map, int iters) {}
+
+template<> inline void SET_DELETED_KEY(sparse_hash_map<int, int>& m, int key) {
+  m.set_deleted_key(key);
+}
+template<> inline void SET_DELETED_KEY(dense_hash_map<int, int>& m, int key) {
+  m.set_deleted_key(key);
+}
+
+template<> inline void SET_EMPTY_KEY(dense_hash_map<int, int>& m, int key) {
+  m.set_empty_key(key);
+}
+
+template<> inline void RESIZE(sparse_hash_map<int, int>& m, int iters) {
+  m.resize(iters);
+}
+template<> inline void RESIZE(dense_hash_map<int, int>& m, int iters) {
+  m.resize(iters);
+}
+#ifndef WIN32
+template<> inline void RESIZE(hash_map<int, int>& m, int iters) {
+  m.resize(iters);
+}
+#endif
+
+static const int default_iters = 10000000;
+
+
+/*
+ * Measure resource usage.
+ */
+
+class Rusage {
+ public:
+  /* Start collecting usage */
+  Rusage() { Reset(); }
+
+  /* Reset collection */
+  void Reset();
+    
+  /* Show usage */
+  double UserTime();
+
+ private:
+#ifdef HAVE_SYS_RESOURCE_H
+  struct rusage start;
+#else
+  time_t start_time_t;
+#endif
+};
+
+inline void Rusage::Reset() {
+#ifdef HAVE_SYS_RESOURCE_H
+  getrusage(RUSAGE_SELF, &start);
+#else
+  time(&start_time_t);
+#endif
+}
+
+inline double Rusage::UserTime() {
+#ifdef HAVE_SYS_RESOURCE_H
+  struct rusage u;
+  
+  getrusage(RUSAGE_SELF, &u);
+  
+  struct timeval result;
+  result.tv_sec  = u.ru_utime.tv_sec  - start.ru_utime.tv_sec;
+  result.tv_usec = u.ru_utime.tv_usec - start.ru_utime.tv_usec;
+  
+  return double(result.tv_sec) + double(result.tv_usec) / 1000000.0;
+#else
+  time_t now;
+  time(&now);
+  return now - start_time_t;
+#endif
+}
+
+
+static void print_uname() {
+#ifdef HAVE_SYS_UTSNAME_H
+  struct utsname u;
+  if (uname(&u) == 0) {
+    printf("%s %s %s %s %s\n",
+           u.sysname, u.nodename, u.release, u.version, u.machine);
+  }
+#endif
+}
+
+// Generate stamp for this run
+static void stamp_run(int iters) {
+  time_t now = time(0);
+  printf("======\n");
+  fflush(stdout);
+  print_uname();
+  printf("Average over %d iterations\n", iters);
+  fflush(stdout);
+  // don't need asctime_r/gmtime_r: we're not threaded
+  printf("Current time (GMT): %s", asctime(gmtime(&now)));
+}
+
+
+static void report(char const* title, double t, int iters) {
+  printf("%-20s %8.02f ns\n",
+         title,
+         (t * 1000000000.0 / iters));
+}
+
+template<class MapType>
+static void time_map_grow(int iters) {
+  MapType set;
+  Rusage t;
+
+  SET_EMPTY_KEY(set, -2);
+  t.Reset();
+  for (int i = 0; i < iters; i++) {
+    set[i] = i+1;
+  }
+  double ut = t.UserTime();
+
+  report("map_grow", ut, iters);
+}
+
+template<class MapType>
+static void time_map_grow_predicted(int iters) {
+  MapType set;
+  Rusage t;
+
+  SET_EMPTY_KEY(set, -2);
+  RESIZE(set, iters);
+  t.Reset();
+  for (int i = 0; i < iters; i++) {
+    set[i] = i+1;
+  }
+  double ut = t.UserTime();
+
+  report("map_predict/grow", ut, iters);
+}
+
+template<class MapType>
+static void time_map_replace(int iters) {
+  MapType set;
+  Rusage t;
+  int i;
+
+  SET_EMPTY_KEY(set, -2);
+  for (i = 0; i < iters; i++) {
+    set[i] = i+1;
+  }
+
+  t.Reset();
+  for (i = 0; i < iters; i++) {
+    set[i] = i+1;
+  }
+  double ut = t.UserTime();
+
+  report("map_replace", ut, iters);
+}
+
+template<class MapType>
+static void time_map_fetch(int iters) {
+  MapType set;
+  Rusage t;
+  int r;
+  int i;
+
+  SET_EMPTY_KEY(set, -2);
+  for (i = 0; i < iters; i++) {
+    set[i] = i+1;
+  }
+
+  r = 1;
+  t.Reset();
+  for (i = 0; i < iters; i++) {
+    r ^= (set.find(i) != set.end());
+  }
+  double ut = t.UserTime();
+
+  report("map_fetch", ut, iters);
+}
+
+template<class MapType>
+static void time_map_remove(int iters) {
+  MapType set;
+  Rusage t;
+  int i;
+
+  SET_EMPTY_KEY(set, -2);
+  for (i = 0; i < iters; i++) {
+    set[i] = i+1;
+  }
+
+  t.Reset();
+  SET_DELETED_KEY(set, -1);
+  for (i = 0; i < iters; i++) {
+    set.erase(i);
+  }
+  double ut = t.UserTime();
+
+  report("map_remove", ut, iters);
+}
+
+template<class MapType>
+static void measure_map(int iters) {
+  time_map_grow<MapType>(iters);
+  time_map_grow_predicted<MapType>(iters);
+  time_map_replace<MapType>(iters);
+  time_map_fetch<MapType>(iters);
+  time_map_remove<MapType>(iters);
+}
+
+int main(int argc, char** argv) {
+  int iters = default_iters;
+  if (argc > 1) {            // first arg is # of iterations
+    iters = atoi(argv[1]);
+  }
+
+  stamp_run(iters);
+
+#ifndef HAVE_SYS_RESOURCE_H
+  printf("\n*** WARNING ***: sys/resources.h was not found, so all times\n"
+         "                 reported are wall-clock time, not user time\n");
+#endif
+
+  printf("\nSPARSE_HASH_MAP:\n");
+  measure_map< sparse_hash_map<int, int> >(iters);
+
+  printf("\nDENSE_HASH_MAP:\n");
+  measure_map< dense_hash_map<int, int> >(iters);
+
+  printf("\nSTANDARD HASH_MAP:\n");
+  measure_map< hash_map<int, int> >(iters);
+
+  printf("\nSTANDARD MAP:\n");
+  measure_map< map<int, int> >(iters);
+
+  return 0;
+}
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/sparsetable_unittest.expected
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/sparsetable_unittest.expected	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/sparsetable_unittest.expected	(revision 2162)
@@ -0,0 +1,119 @@
+x[0]: 0
+x[1]: 0
+x[2]: 0
+x[3]: 0
+x[4]: 10
+x[5]: 0
+x[6]: 0
+x[0]: 0
+x[1]: 0
+x[2]: 0
+x[3]: 0
+x[4]: 10
+x[5]: 0
+x[6]: 0
+x[6]: 0
+x[5]: 0
+x[4]: 10
+x[3]: 0
+x[2]: 0
+x[1]: 0
+x[0]: 0
+x[6]: 0
+x[5]: 0
+x[4]: 10
+x[3]: 0
+x[2]: 0
+x[1]: 0
+x[0]: 0
+x[3]: 0
+x[4]: 10
+x[5]: 0
+x[4]: 10
+x[4]: 10
+x[3]: 0
+x[4]: 10
+x[5]: 55
+x[5]: 55
+x[6]: 66
+x[4]: 10
+x[4]: 10
+x[3]: 0
+x[4]: 10
+x[5]: 55
+x[6]: 66
+x.begin() == x.begin() + 1 - 1? yes
+x.begin() < x.end()? yes
+z.begin() < z.end()? no
+z.begin() <= z.end()? yes
+z.begin() == z.end()? yes
+x[??]: 10
+x[??]: 55
+x[??]: 66
+y[??]: -12
+y[??]: -47
+y[??]: -48
+y[??]: -49
+y[??]: -49
+y[??]: -48
+y[??]: -47
+y[??]: -12
+y[??]: -49
+y[??]: -48
+y[??]: -47
+y[??]: -12
+first non-empty y: -12
+first non-empty x: 10
+first non-empty x: 10
+first non-empty x: 10
+first non-empty y: -12
+first non-empty x: 10
+first non-empty x: 10
+first non-empty x: 10
+x.begin() == x.begin() + 1 - 1? yes
+z.begin() != z.end()? no
+x has 3/7 buckets, y 4/70, z 0/0
+y shrank and grew: it's now 2/70
+y[12] = -12, y.get(12) = -12
+y[12] cleared.  y now 1/70.  y[12] = 0, y.get(12) = 0
+y == z? no
+y[10] is set
+y[11] is set
+y[13] is set
+y[14] is set
+y[30] is set
+y[31] is set
+y[32] is set
+y[33] is set
+y[35] is set
+y[36] is set
+y[37] is set
+y[9898] is set
+That's 12 set buckets
+Starting from y[32]...
+y[??] = -32
+y[??] = -33
+y[??] = -35
+y[??] = -36
+y[??] = -37
+y[??] = -9898
+From y[32] down...
+y[??] = -31
+y[??] = -30
+y[??] = -14
+y[??] = -13
+y[??] = -11
+y[??] = -10
+y2[10] is -10
+y2[11] is -11
+y2[13] is -13
+y2[14] is -14
+y2[30] is -30
+y2[31] is -31
+y2[32] is -32
+y2[33] is -33
+y2[35] is -35
+y2[36] is -36
+y2[37] is -37
+y2[9898] is -9898
+That's 12 set buckets
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/hash_map.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/hash_map.h	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/hash_map.h	(revision 2162)
@@ -0,0 +1,8 @@
+#ifndef WIN32
+# include <ext/hash_map>
+# ifndef HASH_NAMESPACE
+#  define HASH_NAMESPACE __gnu_cxx
+# endif
+#else
+# include <hash_map>
+#endif
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/sparsetable_unittest.cc
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/sparsetable_unittest.cc	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/sparsetable_unittest.cc	(revision 2162)
@@ -0,0 +1,306 @@
+// Copyright (c) 2005, Google Inc.
+// All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+// 
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+// 
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// ---
+// Author: Craig Silverstein
+//
+// This tests <google/sparsetable>
+//
+// Since sparsetable is templatized, it's important that we test every
+// function in every class in this file -- not just to see if it
+// works, but even if it compiles.
+
+#include <google/sparsehash/config.h>
+#include <string>
+#include <stdio.h>
+#include <string.h>         // for memcmp()
+#include <stdlib.h>         // defines unlink() on some windows platforms(?)
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>         // for unlink()
+#endif
+#include <google/sparsetable>
+
+using STL_NAMESPACE::string;
+
+// Many sparsetable operations return a size_t.  Unfortunately, there's
+// no portable way to pass a size_t to snprintf().  This macro casts these
+// things to an unsigned long, which should be big enough for a size_t.
+#define UL(x)    ( static_cast<unsigned long>(x) )
+
+
+static char outbuf[10240];       // big enough for these tests
+static char* out = outbuf;       // where to write next
+#define LEFT (outbuf + sizeof(outbuf) - out)
+
+#define TEST(cond)  out += snprintf(out, LEFT, #cond "? %s\n", \
+                                    cond ? "yes" : "no");
+
+using GOOGLE_NAMESPACE::sparsetable;
+
+// replaces buf, in-place, with a version of buf that lacks \r's.
+static int strip_cr(char* buf, int len) {
+  char *r, *w;
+  for ( r = buf, w = buf; r - buf < len; r++ ) {
+    if (*r != '\r')
+      *w++ = *r;
+  }
+  return w - buf;
+}
+
+int main(int argc, char **argv) {          // though we ignore the args
+  sparsetable<int> x(7), y(70), z;
+  x.set(4, 10);
+  y.set(12, -12);
+  y.set(47, -47);
+  y.set(48, -48);
+  y.set(49, -49);
+
+  const sparsetable<int> constx(x);
+  const sparsetable<int> consty(y);
+
+  // ----------------------------------------------------------------------
+  // Test the plain iterators
+
+  for ( sparsetable<int>::iterator it = x.begin(); it != x.end(); ++it ) {
+    out += snprintf(out, LEFT, "x[%lu]: %d\n", UL(it - x.begin()), int(*it));
+  }
+  for ( sparsetable<int>::const_iterator it = x.begin(); it != x.end(); ++it ) {
+    out += snprintf(out, LEFT, "x[%lu]: %d\n", UL(it - x.begin()), *it);
+  }
+  for ( sparsetable<int>::reverse_iterator it = x.rbegin(); it != x.rend(); ++it ) {
+    out += snprintf(out, LEFT, "x[%lu]: %d\n", UL(x.rend()-1 - it), int(*it));
+  }
+  for ( sparsetable<int>::const_reverse_iterator it = constx.rbegin(); it != constx.rend(); ++it ) {
+    out += snprintf(out, LEFT, "x[%lu]: %d\n", UL(constx.rend()-1 - it), *it);
+  }
+  for ( sparsetable<int>::iterator it = z.begin(); it != z.end(); ++it ) {
+    out += snprintf(out, LEFT, "z[%lu]: %d\n", UL(it - z.begin()), int(*it));
+  }
+
+  {                                          // array version
+    out += snprintf(out, LEFT, "x[3]: %d\n", int(x[3]));
+    out += snprintf(out, LEFT, "x[4]: %d\n", int(x[4]));
+    out += snprintf(out, LEFT, "x[5]: %d\n", int(x[5]));
+  }
+  {
+    sparsetable<int>::iterator it;           // non-const version
+    out += snprintf(out, LEFT, "x[4]: %d\n", int(x.begin()[4]));
+    it = x.begin() + 4;          // should point to the non-zero value
+    out += snprintf(out, LEFT, "x[4]: %d\n", int(*it));
+    it--;
+    --it;
+    it += 5;
+    it -= 2;
+    it++;
+    ++it;
+    it = it - 3;
+    it = 1 + it;                 // now at 5
+    out += snprintf(out, LEFT, "x[3]: %d\n", int(it[-2]));
+    out += snprintf(out, LEFT, "x[4]: %d\n", int(it[-1]));
+    *it = 55;
+    out += snprintf(out, LEFT, "x[5]: %d\n", int(it[0]));
+    out += snprintf(out, LEFT, "x[5]: %d\n", int(*it));
+    int *x6 = &(it[1]);
+    *x6 = 66;
+    out += snprintf(out, LEFT, "x[6]: %d\n", int(*(it + 1)));
+  }
+  {
+    sparsetable<int>::const_iterator it;    // const version
+    out += snprintf(out, LEFT, "x[4]: %d\n", int(x.begin()[4]));
+    it = x.begin() + 4;          // should point to the non-zero value
+    out += snprintf(out, LEFT, "x[4]: %d\n", *it);
+    it--;
+    --it;
+    it += 5;
+    it -= 2;
+    it++;
+    ++it;
+    it = it - 3;
+    it = 1 + it;                 // now at 5
+    out += snprintf(out, LEFT, "x[3]: %d\n", it[-2]);
+    out += snprintf(out, LEFT, "x[4]: %d\n", it[-1]);
+    out += snprintf(out, LEFT, "x[5]: %d\n", *it);
+    out += snprintf(out, LEFT, "x[6]: %d\n", *(it + 1));
+  }
+
+  TEST(x.begin() == x.begin() + 1 - 1);
+  TEST(x.begin() < x.end());
+  TEST(z.begin() < z.end());
+  TEST(z.begin() <= z.end());
+  TEST(z.begin() == z.end());
+
+
+  // ----------------------------------------------------------------------
+  // Test the non-empty iterators
+
+  for ( sparsetable<int>::nonempty_iterator it = x.nonempty_begin(); it != x.nonempty_end(); ++it ) {
+    out += snprintf(out, LEFT, "x[??]: %d\n", *it);
+  }
+  for ( sparsetable<int>::const_nonempty_iterator it = y.nonempty_begin(); it != y.nonempty_end(); ++it ) {
+    out += snprintf(out, LEFT, "y[??]: %d\n", *it);
+  }
+  for ( sparsetable<int>::reverse_nonempty_iterator it = y.nonempty_rbegin(); it != y.nonempty_rend(); ++it ) {
+    out += snprintf(out, LEFT, "y[??]: %d\n", *it);
+  }
+  for ( sparsetable<int>::const_reverse_nonempty_iterator it = consty.nonempty_rbegin(); it != consty.nonempty_rend(); ++it ) {
+    out += snprintf(out, LEFT, "y[??]: %d\n", *it);
+  }
+  for ( sparsetable<int>::nonempty_iterator it = z.nonempty_begin(); it != z.nonempty_end(); ++it ) {
+    out += snprintf(out, LEFT, "z[??]: %d\n", *it);
+  }
+
+  {
+    sparsetable<int>::nonempty_iterator it;           // non-const version
+    out += snprintf(out, LEFT, "first non-empty y: %d\n", *y.nonempty_begin());
+    out += snprintf(out, LEFT, "first non-empty x: %d\n", *x.nonempty_begin());
+    it = x.nonempty_begin();
+    ++it;                        // should be at end
+    --it;
+    out += snprintf(out, LEFT, "first non-empty x: %d\n", *it++);
+    it--;
+    out += snprintf(out, LEFT, "first non-empty x: %d\n", *it++);
+  }
+  {
+    sparsetable<int>::const_nonempty_iterator it;           // non-const version
+    out += snprintf(out, LEFT, "first non-empty y: %d\n", *y.nonempty_begin());
+    out += snprintf(out, LEFT, "first non-empty x: %d\n", *x.nonempty_begin());
+    it = x.nonempty_begin();
+    ++it;                        // should be at end
+    --it;
+    out += snprintf(out, LEFT, "first non-empty x: %d\n", *it++);
+    it--;
+    out += snprintf(out, LEFT, "first non-empty x: %d\n", *it++);
+  }
+
+  TEST(x.begin() == x.begin() + 1 - 1);
+  TEST(z.begin() != z.end());
+
+  // ----------------------------------------------------------------------
+  // Test sparsetable functions
+  out += snprintf(out, LEFT, "x has %lu/%lu buckets, "
+                  "y %lu/%lu, z %lu/%lu\n",
+                  UL(x.num_nonempty()), UL(x.size()),
+                  UL(y.num_nonempty()), UL(y.size()),
+                  UL(z.num_nonempty()), UL(z.size()));
+  
+  y.resize(48);              // should get rid of 48 and 49
+  y.resize(70);              // 48 and 49 should still be gone
+  out += snprintf(out, LEFT, "y shrank and grew: it's now %lu/%lu\n",
+                  UL(y.num_nonempty()), UL(y.size()));
+  out += snprintf(out, LEFT, "y[12] = %d, y.get(12) = %d\n", int(y[12]), y.get(12));
+  y.erase(12);
+  out += snprintf(out, LEFT, "y[12] cleared.  y now %lu/%lu.  "
+                  "y[12] = %d, y.get(12) = %d\n",
+                  UL(y.num_nonempty()), UL(y.size()), int(y[12]), y.get(12));
+
+  swap(x, y);
+
+  y.clear();
+  TEST(y == z);
+
+  y.resize(70);
+  for ( int i = 10; i < 40; ++i )
+    y[i] = -i;
+  y.erase(y.begin() + 15, y.begin() + 30);
+  y.erase(y.begin() + 34);
+  y.erase(12);
+  y.resize(38);
+  y.resize(10000);
+  y[9898] = -9898;
+  for ( sparsetable<int>::const_iterator it = y.begin(); it != y.end(); ++it ) {
+    if ( y.test(it) )
+      out += snprintf(out, LEFT, "y[%lu] is set\n", UL(it - y.begin()));
+  }
+  out += snprintf(out, LEFT, "That's %lu set buckets\n", UL(y.num_nonempty()));
+
+  out += snprintf(out, LEFT, "Starting from y[32]...\n");
+  for ( sparsetable<int>::const_nonempty_iterator it = y.get_iter(32);
+        it != y.nonempty_end(); ++it )
+    out += snprintf(out, LEFT, "y[??] = %d\n", *it);
+
+  out += snprintf(out, LEFT, "From y[32] down...\n");
+  for ( sparsetable<int>::nonempty_iterator it = y.get_iter(32);
+        it != y.nonempty_begin(); )
+    out += snprintf(out, LEFT, "y[??] = %d\n", *--it);
+
+  // ----------------------------------------------------------------------
+  // Test I/O
+  const char *file = "/tmp/#sparsetable.test";
+  FILE *fp = fopen(file, "wb");
+  if ( fp == NULL ) {
+    // maybe we can't write to /tmp/.  Try the current directory
+    file = "#sparsetable.test";
+    fp = fopen(file, "wb");
+  }
+  if ( fp == NULL ) {
+    out += snprintf(out, LEFT, "Can't open %s, skipping disk write...\n", file);
+  } else {
+    y.write_metadata(fp);          // only write meta-information
+    y.write_nopointer_data(fp);
+    fclose(fp);
+  }
+  fp = fopen(file, "rb");
+  if ( fp == NULL ) {
+    out += snprintf(out, LEFT, "Can't open %s, skipping disk read...\n", file);
+  } else {
+    sparsetable<int> y2;
+    y2.read_metadata(fp);
+    y2.read_nopointer_data(fp);
+    fclose(fp);
+
+    for ( sparsetable<int>::const_iterator it = y2.begin(); it != y2.end(); ++it ) {
+      if ( y2.test(it) )
+        out += snprintf(out, LEFT, "y2[%lu] is %d\n", UL(it - y2.begin()), *it);
+    }
+    out += snprintf(out, LEFT, "That's %lu set buckets\n", UL(y2.num_nonempty()));
+  }
+  unlink(file);
+
+  // Finally, check to see if our output (in out) is what it's supposed to be.
+  char expected[sizeof(outbuf) + 10];
+  string filename = (string(getenv("srcdir") ? getenv("srcdir") : ".") +
+                     "/src/sparsetable_unittest.expected");
+  FILE* expected_fp = fopen(filename.c_str(), "rb");
+  if ( expected_fp == NULL ) {
+    fprintf(stderr, "Can't judge test: can't load 'golden' file '%s'.\n",
+            filename.c_str());
+    return 2;
+  }
+  int r = fread(expected, 1, sizeof(expected) - 1, expected_fp);
+  r = strip_cr(expected, r);
+  if ( r != out - outbuf ||             // output not the same size
+       memcmp(outbuf, expected, r) ) {  // or bytes differed
+    fprintf(stderr, "TESTS FAILED\n\nEXPECTED:\n\n%s\n\nACTUAL:\n\n%s\n\n",
+            expected, outbuf);
+    return 1;
+  } else {
+    printf("All tests passed.\n");
+    return 0;
+  }
+}
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/windows/hash_fun.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/windows/hash_fun.h	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/windows/hash_fun.h	(revision 2162)
@@ -0,0 +1,5 @@
+#ifndef HASH_NAMESPACE
+#define HASH_NAMESPACE std
+#endif
+
+#include <google/sparsehash/stl_hash_fun.h>
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/windows/stl_hash_fun.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/windows/stl_hash_fun.h	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/windows/stl_hash_fun.h	(revision 2162)
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ *   You should not attempt to use it directly.
+ */
+
+#ifndef __SGI_STL_HASH_FUN_H
+#define __SGI_STL_HASH_FUN_H
+
+#include <google/sparsehash/config.h>
+#include <stddef.h>
+
+#define __STL_TEMPLATE_NULL template<>
+
+namespace HASH_NAMESPACE {
+
+template <class _Key> struct hash { };
+
+inline size_t __stl_hash_string(const char* __s)
+{
+  unsigned long __h = 0; 
+  for ( ; *__s; ++__s)
+    __h = 5*__h + *__s;
+  
+  return size_t(__h);
+}
+
+__STL_TEMPLATE_NULL struct hash<char*>
+{
+  size_t operator()(const char* __s) const { return __stl_hash_string(__s); }
+};
+
+__STL_TEMPLATE_NULL struct hash<const char*>
+{
+  size_t operator()(const char* __s) const { return __stl_hash_string(__s); }
+};
+
+__STL_TEMPLATE_NULL struct hash<char> {
+  size_t operator()(char __x) const { return __x; }
+};
+__STL_TEMPLATE_NULL struct hash<unsigned char> {
+  size_t operator()(unsigned char __x) const { return __x; }
+};
+__STL_TEMPLATE_NULL struct hash<signed char> {
+  size_t operator()(unsigned char __x) const { return __x; }
+};
+__STL_TEMPLATE_NULL struct hash<short> {
+  size_t operator()(short __x) const { return __x; }
+};
+__STL_TEMPLATE_NULL struct hash<unsigned short> {
+  size_t operator()(unsigned short __x) const { return __x; }
+};
+__STL_TEMPLATE_NULL struct hash<int> {
+  size_t operator()(int __x) const { return __x; }
+};
+__STL_TEMPLATE_NULL struct hash<unsigned int> {
+  size_t operator()(unsigned int __x) const { return __x; }
+};
+__STL_TEMPLATE_NULL struct hash<long> {
+  size_t operator()(long __x) const { return __x; }
+};
+__STL_TEMPLATE_NULL struct hash<unsigned long> {
+  size_t operator()(unsigned long __x) const { return __x; }
+};
+
+};
+
+#endif /* __SGI_STL_HASH_FUN_H */
+
+// Local Variables:
+// mode:C++
+// End:
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/windows/hash_map.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/windows/hash_map.h	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/windows/hash_map.h	(revision 2162)
@@ -0,0 +1,4 @@
+#include <hash_map>
+#ifndef HASH_NAMESPACE
+#define HASH_NAMESPACE std
+#endif
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsehash/sparsehashtable.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsehash/sparsehashtable.h	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsehash/sparsehashtable.h	(revision 2162)
@@ -0,0 +1,896 @@
+// Copyright (c) 2005, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// ---
+// Author: Craig Silverstein
+//
+// A sparse hashtable is a particular implementation of
+// a hashtable: one that is meant to minimize memory use.
+// It does this by using a *sparse table* (cf sparsetable.h),
+// which uses between 1 and 2 bits to store empty buckets
+// (we may need another bit for hashtables that support deletion).
+//
+// When empty buckets are so cheap, an appealing hashtable
+// implementation is internal probing, in which the hashtable
+// is a single table, and collisions are resolved by trying
+// to insert again in another bucket.  The most cache-efficient
+// internal probing schemes are linear probing (which suffers,
+// alas, from clumping) and quadratic probing, which is what
+// we implement by default.
+//
+// Deleted buckets are a bit of a pain.  We have to somehow mark
+// deleted buckets (the probing must distinguish them from empty
+// buckets).  The most principled way is to have another bitmap,
+// but that's annoying and takes up space.  Instead we let the
+// user specify an "impossible" key.  We set deleted buckets
+// to have the impossible key.
+//
+// Note it is possible to change the value of the delete key
+// on the fly; you can even remove it, though after that point
+// the hashtable is insert_only until you set it again.
+//
+// You probably shouldn't use this code directly.  Use
+// <google/sparse_hash_table> or <google/sparse_hash_set> instead.
+
+// You can change the following below:
+// HT_OCCUPANCY_FLT      -- how full before we double size
+// HT_EMPTY_FLT          -- how empty before  we halve size
+// HT_MIN_BUCKETS        -- smallest bucket size
+//
+// How to decide what values to use?
+// HT_EMPTY_FLT's default of .4 * OCCUPANCY_FLT, is probably good.
+// HT_MIN_BUCKETS is probably unnecessary since you can specify
+// (indirectly) the starting number of buckets at construct-time.
+// For HT_OCCUPANCY_FLT, you can use this chart to try to trade-off
+// expected lookup time to the space taken up.  By default, this
+// code uses quadratic probing, though you can change it to linear
+// via _JUMP below if you really want to.
+//
+// From http://www.augustana.ca/~mohrj/courses/1999.fall/csc210/lecture_notes/hashing.html
+// NUMBER OF PROBES / LOOKUP       Successful            Unsuccessful
+// Quadratic collision resolution   1 - ln(1-L) - L/2    1/(1-L) - L - ln(1-L)
+// Linear collision resolution     [1+1/(1-L)]/2         [1+1/(1-L)2]/2
+//
+// -- HT_OCCUPANCY_FLT --         0.10  0.50  0.60  0.75  0.80  0.90  0.99
+// QUADRATIC COLLISION RES.
+//    probes/successful lookup    1.05  1.44  1.62  2.01  2.21  2.85  5.11
+//    probes/unsuccessful lookup  1.11  2.19  2.82  4.64  5.81  11.4  103.6
+// LINEAR COLLISION RES.
+//    probes/successful lookup    1.06  1.5   1.75  2.5   3.0   5.5   50.5
+//    probes/unsuccessful lookup  1.12  2.5   3.6   8.5   13.0  50.0  5000.0
+
+
+#ifndef _SPARSEHASHTABLE_H_
+#define _SPARSEHASHTABLE_H_
+
+#ifndef SPARSEHASH_STAT_UPDATE
+#define SPARSEHASH_STAT_UPDATE(x) ((void) 0)
+#endif
+
+// The probing method
+// Linear probing
+// #define JUMP_(key, num_probes)    ( 1 )
+// Quadratic-ish probing
+#define JUMP_(key, num_probes)    ( num_probes )
+
+
+// Hashtable class, used to implement the hashed associative containers
+// hash_set and hash_map.
+
+#include <google/sparsehash/config.h>
+#include <assert.h>
+#include <algorithm>              // For swap(), eg
+#include <google/sparsetable>     // Since that's basically what we are
+
+_START_GOOGLE_NAMESPACE_
+
+using STL_NAMESPACE::pair;
+
+// sparsetable uses malloc()/realloc()/free(), so Alloc is basically
+// ignored.  We include it because we're being compatible.
+// TODO(csilvers): is that the right thing to do?
+
+template <class Value, class Key, class HashFcn,
+          class ExtractKey, class EqualKey, class Alloc>
+class sparse_hashtable;
+
+template <class V, class K, class HF, class ExK, class EqK, class A>
+struct sparse_hashtable_iterator;
+
+template <class V, class K, class HF, class ExK, class EqK, class A>
+struct sparse_hashtable_const_iterator;
+
+// As far as iterating, we're basically just a sparsetable
+// that skips over deleted elements.
+template <class V, class K, class HF, class ExK, class EqK, class A>
+struct sparse_hashtable_iterator {
+ public:
+  typedef sparse_hashtable<V,K,HF,ExK,EqK,A>                sparse_hashtable;
+  typedef sparse_hashtable_iterator<V,K,HF,ExK,EqK,A>       iterator;
+  typedef sparse_hashtable_const_iterator<V,K,HF,ExK,EqK,A> const_iterator;
+  typedef typename sparsetable<V>::nonempty_iterator        st_iterator;
+
+#ifdef UNDERSTANDS_ITERATOR_TAGS
+  typedef STL_NAMESPACE::forward_iterator_tag iterator_category;
+#endif
+  typedef V value_type;
+  typedef ptrdiff_t difference_type;
+  typedef size_t size_type;
+  typedef V& reference;                // Value
+  typedef V* pointer;
+
+  // "Real" constructor and default constructor
+  sparse_hashtable_iterator(const sparse_hashtable *h,
+                            st_iterator it, st_iterator it_end)
+    : ht(h), pos(it), end(it_end)   { advance_past_deleted(); }
+  sparse_hashtable_iterator() { }      // not ever used internally
+  // The default destructor is fine; we don't define one
+  // The default operator= is fine; we don't define one
+
+  // Happy dereferencer
+  reference operator*() const { return *pos; }
+  pointer operator->() const { return &(operator*()); }
+
+  // Arithmetic.  The only hard part is making sure that
+  // we're not on a marked-deleted array element
+  void advance_past_deleted() {
+    while ( pos != end && ht->test_deleted(*this) )
+      ++pos;
+  }
+  iterator& operator++()   {
+    assert(pos != end); ++pos; advance_past_deleted(); return *this;
+  }
+  iterator operator++(int) { iterator tmp(*this); ++*this; return tmp; }
+
+  // Comparison.
+  bool operator==(const iterator& it) const { return pos == it.pos; }
+  bool operator!=(const iterator& it) const { return pos != it.pos; }
+
+
+  // The actual data
+  const sparse_hashtable *ht;
+  st_iterator pos, end;
+};
+
+// Now do it all again, but with const-ness!
+template <class V, class K, class HF, class ExK, class EqK, class A>
+struct sparse_hashtable_const_iterator {
+ public:
+  typedef sparse_hashtable<V,K,HF,ExK,EqK,A>                sparse_hashtable;
+  typedef sparse_hashtable_iterator<V,K,HF,ExK,EqK,A>       iterator;
+  typedef sparse_hashtable_const_iterator<V,K,HF,ExK,EqK,A> const_iterator;
+  typedef typename sparsetable<V>::const_nonempty_iterator  st_iterator;
+
+#ifdef UNDERSTANDS_ITERATOR_TAGS
+  typedef STL_NAMESPACE::forward_iterator_tag iterator_category;
+#endif
+  typedef V value_type;
+  typedef ptrdiff_t difference_type;
+  typedef size_t size_type;
+  typedef const V& reference;                // Value
+  typedef const V* pointer;
+
+  // "Real" constructor and default constructor
+  sparse_hashtable_const_iterator(const sparse_hashtable *h,
+                                  st_iterator it, st_iterator it_end)
+    : ht(h), pos(it), end(it_end)   { advance_past_deleted(); }
+  // This lets us convert regular iterators to const iterators
+  sparse_hashtable_const_iterator() { }      // never used internally
+  sparse_hashtable_const_iterator(const iterator &it)
+    : ht(it.ht), pos(it.pos), end(it.end) { }
+  // The default destructor is fine; we don't define one
+  // The default operator= is fine; we don't define one
+
+  // Happy dereferencer
+  reference operator*() const { return *pos; }
+  pointer operator->() const { return &(operator*()); }
+
+  // Arithmetic.  The only hard part is making sure that
+  // we're not on a marked-deleted array element
+  void advance_past_deleted() {
+    while ( pos != end && ht->test_deleted(*this) )
+      ++pos;
+  }
+  const_iterator& operator++() {
+    assert(pos != end); ++pos; advance_past_deleted(); return *this;
+  }
+  const_iterator operator++(int) { iterator tmp(*this); ++*this; return tmp; }
+
+  // Comparison.
+  bool operator==(const const_iterator& it) const { return pos == it.pos; }
+  bool operator!=(const const_iterator& it) const { return pos != it.pos; }
+
+
+  // The actual data
+  const sparse_hashtable *ht;
+  st_iterator pos, end;
+};
+
+// And once again, but this time freeing up memory as we iterate
+template <class V, class K, class HF, class ExK, class EqK, class A>
+struct sparse_hashtable_destructive_iterator {
+ public:
+  typedef sparse_hashtable<V,K,HF,ExK,EqK,A>                sparse_hashtable;
+  typedef sparse_hashtable_destructive_iterator<V,K,HF,ExK,EqK,A> iterator;
+  typedef typename sparsetable<V>::destructive_iterator     st_iterator;
+
+#ifdef UNDERSTANDS_ITERATOR_TAGS
+  typedef STL_NAMESPACE::forward_iterator_tag iterator_category;
+#endif
+  typedef V value_type;
+  typedef ptrdiff_t difference_type;
+  typedef size_t size_type;
+  typedef V& reference;                // Value
+  typedef V* pointer;
+
+  // "Real" constructor and default constructor
+  sparse_hashtable_destructive_iterator(const sparse_hashtable *h,
+                                        st_iterator it, st_iterator it_end)
+    : ht(h), pos(it), end(it_end)   { advance_past_deleted(); }
+  sparse_hashtable_destructive_iterator() { }          // never used internally
+  // The default destructor is fine; we don't define one
+  // The default operator= is fine; we don't define one
+
+  // Happy dereferencer
+  reference operator*() const { return *pos; }
+  pointer operator->() const { return &(operator*()); }
+
+  // Arithmetic.  The only hard part is making sure that
+  // we're not on a marked-deleted array element
+  void advance_past_deleted() {
+    while ( pos != end && ht->test_deleted(*this) )
+      ++pos;
+  }
+  iterator& operator++()   {
+    assert(pos != end); ++pos; advance_past_deleted(); return *this;
+  }
+  iterator operator++(int) { iterator tmp(*this); ++*this; return tmp; }
+
+  // Comparison.
+  bool operator==(const iterator& it) const { return pos == it.pos; }
+  bool operator!=(const iterator& it) const { return pos != it.pos; }
+
+
+  // The actual data
+  const sparse_hashtable *ht;
+  st_iterator pos, end;
+};
+
+
+
+template <class Value, class Key, class HashFcn,
+          class ExtractKey, class EqualKey, class Alloc>
+class sparse_hashtable {
+ public:
+  typedef Key key_type;
+  typedef Value value_type;
+  typedef HashFcn hasher;
+  typedef EqualKey key_equal;
+
+  typedef size_t            size_type;
+  typedef ptrdiff_t         difference_type;
+  typedef value_type*       pointer;
+  typedef const value_type* const_pointer;
+  typedef value_type&       reference;
+  typedef const value_type& const_reference;
+  typedef sparse_hashtable_iterator<Value, Key, HashFcn,
+                                    ExtractKey, EqualKey, Alloc>
+  iterator;
+
+  typedef sparse_hashtable_const_iterator<Value, Key, HashFcn,
+                                          ExtractKey, EqualKey, Alloc>
+  const_iterator;
+
+  typedef sparse_hashtable_destructive_iterator<Value, Key, HashFcn,
+                                                ExtractKey, EqualKey, Alloc>
+  destructive_iterator;
+
+  // How full we let the table get before we resize.  Knuth says .8 is
+  // good -- higher causes us to probe too much, though saves memory
+  static const float HT_OCCUPANCY_FLT; // = 0.8f;
+
+  // How empty we let the table get before we resize lower.
+  // It should be less than OCCUPANCY_FLT / 2 or we thrash resizing
+  static const float HT_EMPTY_FLT; // = 0.4 * HT_OCCUPANCY_FLT;
+
+  // Minimum size we're willing to let hashtables be.
+  // Must be a power of two, and at least 4.
+  // Note, however, that for a given hashtable, the minimum size is
+  // determined by the first constructor arg, and may be >HT_MIN_BUCKETS.
+  static const size_t HT_MIN_BUCKETS = 32;
+
+
+  // ITERATOR FUNCTIONS
+  iterator begin()             { return iterator(this, table.nonempty_begin(),
+                                                 table.nonempty_end()); }
+  iterator end()               { return iterator(this, table.nonempty_end(),
+                                                 table.nonempty_end()); }
+  const_iterator begin() const { return const_iterator(this,
+                                                       table.nonempty_begin(),
+                                                       table.nonempty_end()); }
+  const_iterator end() const   { return const_iterator(this,
+                                                       table.nonempty_end(),
+                                                       table.nonempty_end()); }
+
+  // This is used when resizing
+  destructive_iterator destructive_begin() {
+    return destructive_iterator(this, table.destructive_begin(),
+                                table.destructive_end());
+  }
+  destructive_iterator destructive_end() {
+    return destructive_iterator(this, table.destructive_end(),
+                                table.destructive_end());
+  }
+
+
+  // ACCESSOR FUNCTIONS for the things we templatize on, basically
+  hasher hash_funct() const { return hash; }
+  key_equal key_eq() const  { return equals; }
+
+  // Annoyingly, we can't copy values around, because they might have
+  // const components (they're probably pair<const X, Y>).  We use
+  // placement new to get around this.  Arg.
+ private:
+  void set_value(value_type* dst, const value_type src) {
+    new(dst) value_type(src);
+  }
+
+  void set_key(key_type* dst, const key_type src) {
+    new(dst) key_type(src);   // used for set_deleted_key(), etc
+  }
+
+  // This is used as a tag for the copy constructor, saying to destroy its
+  // arg We have two ways of destructively copying: with potentially growing
+  // the hashtable as we copy, and without.  To make sure the outside world
+  // can't do a destructive copy, we make the typename private.
+  enum MoveDontCopyT {MoveDontCopy, MoveDontGrow};
+
+
+  // DELETE HELPER FUNCTIONS
+  // This lets the user describe a key that will indicate deleted
+  // table entries.  This key should be an "impossible" entry --
+  // if you try to insert it for real, you won't be able to retrieve it!
+  // (NB: while you pass in an entire value, only the key part is looked
+  // at.  This is just because I don't know how to assign just a key.)
+ private:
+  void squash_deleted() {           // gets rid of any deleted entries we have
+    if ( num_deleted ) {            // get rid of deleted before writing
+      sparse_hashtable tmp(MoveDontGrow, *this);
+      swap(tmp);                    // now we are tmp
+    }
+    assert(num_deleted == 0);
+  }
+
+ public:
+  void set_deleted_key(const key_type &key) {
+    // It's only safe to change what "deleted" means if we purge deleted guys
+    squash_deleted();
+    use_deleted = true;
+    set_key(&delkey, key);         // save the key
+  }
+  void clear_deleted_key() {
+    squash_deleted();
+    use_deleted = false;
+  }
+
+  // These are public so the iterators can use them
+  // True if the item at position bucknum is "deleted" marker
+  bool test_deleted(size_type bucknum) const {
+    // The num_deleted test is crucial for read(): after read(), the ht values
+    // are garbage, and we don't want to think some of them are deleted.
+    return (use_deleted && num_deleted > 0 && table.test(bucknum) &&
+            equals(delkey, get_key(table.get(bucknum))));
+  }
+  bool test_deleted(const iterator &it) const {
+    return (use_deleted && num_deleted > 0 &&
+            equals(delkey, get_key(*it)));
+  }
+  bool test_deleted(const const_iterator &it) const {
+    return (use_deleted && num_deleted > 0 &&
+            equals(delkey, get_key(*it)));
+  }
+  bool test_deleted(const destructive_iterator &it) const {
+    return (use_deleted && num_deleted > 0 &&
+            equals(delkey, get_key(*it)));
+  }
+  // Set it so test_deleted is true.  true if object didn't used to be deleted
+  // See below (at erase()) to explain why we allow const_iterators
+  bool set_deleted(const_iterator &it) {
+    assert(use_deleted);             // bad if set_deleted_key() wasn't called
+    bool retval = !test_deleted(it);
+    // &* converts from iterator to value-type
+    set_key(const_cast<key_type*>(&get_key(*it)), delkey);
+    return retval;
+  }
+  // Set it so test_deleted is false.  true if object used to be deleted
+  bool clear_deleted(const_iterator &it) {
+    assert(use_deleted);             // bad if set_deleted_key() wasn't called
+    // happens automatically when we assign something else in its place
+    return test_deleted(it);
+  }
+
+
+  // FUNCTIONS CONCERNING SIZE
+  size_type size() const      { return table.num_nonempty() - num_deleted; }
+  // Buckets are always a power of 2
+  size_type max_size() const  { return (size_type(-1) >> 1U) + 1; }
+  bool empty() const          { return size() == 0; }
+  size_type bucket_count() const      { return table.size(); }
+  size_type max_bucket_count() const  { return max_size(); }
+
+ private:
+  // Because of the above, size_type(-1) is never legal; use it for errors
+  static const size_type ILLEGAL_BUCKET = size_type(-1);
+
+ private:
+  // This is the smallest size a hashtable can be without being too crowded
+  // If you like, you can give a min #buckets as well as a min #elts
+  size_type min_size(size_type num_elts, size_type min_buckets_wanted) {
+    size_type sz = HT_MIN_BUCKETS;
+    while ( sz < min_buckets_wanted || num_elts >= sz * HT_OCCUPANCY_FLT )
+      sz *= 2;
+    return sz;
+  }
+
+  // Used after a string of deletes
+  void maybe_shrink() {
+    assert(table.num_nonempty() >= num_deleted);
+    assert((bucket_count() & (bucket_count()-1)) == 0); // is a power of two
+    assert(bucket_count() >= HT_MIN_BUCKETS);
+
+    if ( (table.num_nonempty()-num_deleted) <= shrink_threshold &&
+         bucket_count() > HT_MIN_BUCKETS ) {
+      size_type sz = bucket_count() / 2;    // find how much we should shrink
+      while ( sz > HT_MIN_BUCKETS &&
+              (table.num_nonempty() - num_deleted) <= sz * HT_EMPTY_FLT )
+        sz /= 2;                            // stay a power of 2
+      sparse_hashtable tmp(MoveDontCopy, *this, sz);
+      swap(tmp);                            // now we are tmp
+    }
+    consider_shrink = false;                // because we just considered it
+  }
+
+  // We'll let you resize a hashtable -- though this makes us copy all!
+  // When you resize, you say, "make it big enough for this many more elements"
+  void resize_delta(size_type delta, size_type min_buckets_wanted = 0) {
+    if ( consider_shrink )                   // see if lots of deletes happened
+      maybe_shrink();
+    if ( bucket_count() > min_buckets_wanted &&
+         (table.num_nonempty() + delta) <= enlarge_threshold )
+      return;                                // we're ok as we are
+
+    const size_type resize_to = min_size(table.num_nonempty() + delta,
+                                         min_buckets_wanted);
+    if ( resize_to > bucket_count() ) {      // we don't have enough buckets
+      sparse_hashtable tmp(MoveDontCopy, *this, resize_to);
+      swap(tmp);                             // now we are tmp
+    }
+  }
+
+  // Used to actually do the rehashing when we grow/shrink a hashtable
+  void copy_from(const sparse_hashtable &ht, size_type min_buckets_wanted = 0) {
+    clear();            // clear table, set num_deleted to 0
+
+    // If we need to change the size of our table, do it now
+    const size_type resize_to = min_size(ht.size(), min_buckets_wanted);
+    if ( resize_to > bucket_count() ) {      // we don't have enough buckets
+      table.resize(resize_to);               // sets the number of buckets
+      reset_thresholds();
+    }
+
+    // We use a normal iterator to get non-deleted bcks from ht
+    // We could use insert() here, but since we know there are
+    // no duplicates and no deleted items, we can be more efficient
+    assert( (bucket_count() & (bucket_count()-1)) == 0);      // a power of two
+    for ( const_iterator it = ht.begin(); it != ht.end(); ++it ) {
+      size_type num_probes = 0;              // how many times we've probed
+      size_type bucknum;
+      const size_type bucket_count_minus_one = bucket_count() - 1;
+      for (bucknum = hash(get_key(*it)) & bucket_count_minus_one;
+           table.test(bucknum);                          // not empty
+           bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one) {
+        ++num_probes;
+        assert(num_probes < bucket_count()); // or else the hashtable is full
+      }
+      table.set(bucknum, *it);               // copies the value to here
+    }
+  }
+
+  // Implementation is like copy_from, but it destroys the table of the
+  // "from" guy by freeing sparsetable memory as we iterate.  This is
+  // useful in resizing, since we're throwing away the "from" guy anyway.
+  void move_from(MoveDontCopyT mover, sparse_hashtable &ht,
+                 size_type min_buckets_wanted = 0) {
+    clear();            // clear table, set num_deleted to 0
+
+    // If we need to change the size of our table, do it now
+    size_t resize_to;
+    if ( mover == MoveDontGrow )
+      resize_to = ht.bucket_count();         // keep same size as old ht
+    else                                     // MoveDontCopy
+      resize_to = min_size(ht.size(), min_buckets_wanted);
+    if ( resize_to > bucket_count() ) {      // we don't have enough buckets
+      table.resize(resize_to);               // sets the number of buckets
+      reset_thresholds();
+    }
+
+    // We use a normal iterator to get non-deleted bcks from ht
+    // We could use insert() here, but since we know there are
+    // no duplicates and no deleted items, we can be more efficient
+    assert( (bucket_count() & (bucket_count()-1)) == 0);      // a power of two
+    // THIS IS THE MAJOR LINE THAT DIFFERS FROM COPY_FROM():
+    for ( destructive_iterator it = ht.destructive_begin();
+          it != ht.destructive_end(); ++it ) {
+      size_type num_probes = 0;              // how many times we've probed
+      size_type bucknum;
+      for ( bucknum = hash(get_key(*it)) & (bucket_count()-1);  // h % buck_cnt
+            table.test(bucknum);                          // not empty
+            bucknum = (bucknum + JUMP_(key, num_probes)) & (bucket_count()-1) ) {
+        ++num_probes;
+        assert(num_probes < bucket_count()); // or else the hashtable is full
+      }
+      table.set(bucknum, *it);               // copies the value to here
+    }
+  }
+
+
+  // Required by the spec for hashed associative container
+ public:
+  // Though the docs say this should be num_buckets, I think it's much
+  // more useful as num_elements.  As a special feature, calling with
+  // req_elements==0 will cause us to shrink if we can, saving space.
+  void resize(size_type req_elements) {       // resize to this or larger
+    if ( consider_shrink || req_elements == 0 )
+      maybe_shrink();
+    if ( req_elements > table.num_nonempty() )    // we only grow
+      resize_delta(req_elements - table.num_nonempty(), 0);
+  }
+
+
+  // CONSTRUCTORS -- as required by the specs, we take a size,
+  // but also let you specify a hashfunction, key comparator,
+  // and key extractor.  We also define a copy constructor and =.
+  // DESTRUCTOR -- the default is fine, surprisingly.
+  explicit sparse_hashtable(size_type n = 0,
+                            const HashFcn& hf = HashFcn(),
+                            const EqualKey& eql = EqualKey(),
+                            const ExtractKey& ext = ExtractKey())
+    : hash(hf), equals(eql), get_key(ext), num_deleted(0),
+      use_deleted(false), delkey(), table(min_size(0, n)) {    // start small
+    reset_thresholds();
+  }
+
+  // As a convenience for resize(), we allow an optional second argument
+  // which lets you make this new hashtable a different size than ht.
+  // We also provide a mechanism of saying you want to "move" the ht argument
+  // into us instead of copying.
+  sparse_hashtable(const sparse_hashtable& ht, size_type min_buckets_wanted = 0)
+    : hash(ht.hash), equals(ht.equals), get_key(ht.get_key),
+      num_deleted(0), use_deleted(ht.use_deleted), delkey(ht.delkey), table() {
+    reset_thresholds();
+    copy_from(ht, min_buckets_wanted);   // copy_from() ignores deleted entries
+  }
+  sparse_hashtable(MoveDontCopyT mover, sparse_hashtable& ht,
+                   size_type min_buckets_wanted=0)
+    : hash(ht.hash), equals(ht.equals), get_key(ht.get_key),
+      num_deleted(0), use_deleted(ht.use_deleted), delkey(ht.delkey), table() {
+    reset_thresholds();
+    move_from(mover, ht, min_buckets_wanted);  // ignores deleted entries
+  }
+
+  sparse_hashtable& operator= (const sparse_hashtable& ht) {
+    if (&ht == this)  return *this;        // don't copy onto ourselves
+    clear();
+    hash = ht.hash;
+    equals = ht.equals;
+    get_key = ht.get_key;
+    use_deleted = ht.use_deleted;
+    set_key(&delkey, ht.delkey);
+    copy_from(ht);                         // sets num_deleted to 0 too
+    return *this;
+  }
+
+  // Many STL algorithms use swap instead of copy constructors
+  void swap(sparse_hashtable& ht) {
+    STL_NAMESPACE::swap(hash, ht.hash);
+    STL_NAMESPACE::swap(equals, ht.equals);
+    STL_NAMESPACE::swap(get_key, ht.get_key);
+    STL_NAMESPACE::swap(num_deleted, ht.num_deleted);
+    STL_NAMESPACE::swap(use_deleted, ht.use_deleted);
+    { key_type tmp;     // for annoying reasons, swap() doesn't work
+      set_key(&tmp, delkey);
+      set_key(&delkey, ht.delkey);
+      set_key(&ht.delkey, tmp);
+    }
+    table.swap(ht.table);
+    reset_thresholds();
+    ht.reset_thresholds();
+  }
+
+  // It's always nice to be able to clear a table without deallocating it
+  void clear() {
+    table.clear();
+    reset_thresholds();
+    num_deleted = 0;
+  }
+
+
+  // LOOKUP ROUTINES
+ private:
+  // Returns a pair of positions: 1st where the object is, 2nd where
+  // it would go if you wanted to insert it.  1st is ILLEGAL_BUCKET
+  // if object is not found; 2nd is ILLEGAL_BUCKET if it is.
+  // Note: because of deletions where-to-insert is not trivial: it's the
+  // first deleted bucket we see, as long as we don't find the key later
+  pair<size_type, size_type> find_position(const key_type &key) const {
+    size_type num_probes = 0;              // how many times we've probed
+    const size_type bucket_count_minus_one = bucket_count() - 1;
+    size_type bucknum = hash(key) & bucket_count_minus_one;
+    size_type insert_pos = ILLEGAL_BUCKET; // where we would insert
+    SPARSEHASH_STAT_UPDATE(total_lookups += 1);
+    while ( 1 ) {                          // probe until something happens
+      if ( !table.test(bucknum) ) {        // bucket is empty
+        SPARSEHASH_STAT_UPDATE(total_probes += num_probes);
+        if ( insert_pos == ILLEGAL_BUCKET )  // found no prior place to insert
+          return pair<size_type,size_type>(ILLEGAL_BUCKET, bucknum);
+        else
+          return pair<size_type,size_type>(ILLEGAL_BUCKET, insert_pos);
+
+      } else if ( test_deleted(bucknum) ) {// keep searching, but mark to insert
+        if ( insert_pos == ILLEGAL_BUCKET )
+          insert_pos = bucknum;
+
+      } else if ( equals(key, get_key(table.get(bucknum))) ) {
+        SPARSEHASH_STAT_UPDATE(total_probes += num_probes);
+        return pair<size_type,size_type>(bucknum, ILLEGAL_BUCKET);
+      }
+      ++num_probes;                        // we're doing another probe
+      bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one;
+      assert(num_probes < bucket_count()); // don't probe too many times!
+    }
+  }
+
+ public:
+  iterator find(const key_type& key) {
+    if ( size() == 0 ) return end();
+    pair<size_type, size_type> pos = find_position(key);
+    if ( pos.first == ILLEGAL_BUCKET )     // alas, not there
+      return end();
+    else
+      return iterator(this, table.get_iter(pos.first), table.nonempty_end());
+  }
+
+  const_iterator find(const key_type& key) const {
+    if ( size() == 0 ) return end();
+    pair<size_type, size_type> pos = find_position(key);
+    if ( pos.first == ILLEGAL_BUCKET )     // alas, not there
+      return end();
+    else
+      return const_iterator(this,
+                            table.get_iter(pos.first), table.nonempty_end());
+  }
+
+  // Counts how many elements have key key.  For maps, it's either 0 or 1.
+  size_type count(const key_type &key) const {
+    pair<size_type, size_type> pos = find_position(key);
+    return pos.first == ILLEGAL_BUCKET ? 0 : 1;
+  }
+
+  // Likewise, equal_range doesn't really make sense for us.  Oh well.
+  pair<iterator,iterator> equal_range(const key_type& key) {
+    const iterator pos = find(key);      // either an iterator or end
+    return pair<iterator,iterator>(pos, pos);
+  }
+  pair<const_iterator,const_iterator> equal_range(const key_type& key) const {
+    const const_iterator pos = find(key);      // either an iterator or end
+    return pair<iterator,iterator>(pos, pos);
+  }
+
+
+  // INSERTION ROUTINES
+ private:
+  // If you know *this is big enough to hold obj, use this routine
+  pair<iterator, bool> insert_noresize(const value_type& obj) {
+    const pair<size_type,size_type> pos = find_position(get_key(obj));
+    if ( pos.first != ILLEGAL_BUCKET) {      // object was already there
+      return pair<iterator,bool>(iterator(this, table.get_iter(pos.first),
+                                          table.nonempty_end()),
+                                 false);          // false: we didn't insert
+    } else {                                 // pos.second says where to put it
+      if ( test_deleted(pos.second) ) {      // just replace if it's been del.
+        // The set() below will undelete this object.  We just worry about stats
+        assert(num_deleted > 0);
+        --num_deleted;                       // used to be, now it isn't
+      }
+      table.set(pos.second, obj);
+      return pair<iterator,bool>(iterator(this, table.get_iter(pos.second),
+                                          table.nonempty_end()),
+                                 true);           // true: we did insert
+    }
+  }
+
+ public:
+  // This is the normal insert routine, used by the outside world
+  pair<iterator, bool> insert(const value_type& obj) {
+    resize_delta(1);                      // adding an object, grow if need be
+    return insert_noresize(obj);
+  }
+
+#ifdef UNDERSTANDS_ITERATOR_TAGS
+  // When inserting a lot at a time, we specialize on the type of iterator
+  template <class InputIterator>
+  void insert(InputIterator f, InputIterator l) {
+    // specializes on iterator type
+    insert(f, l, typename STL_NAMESPACE::iterator_traits<InputIterator>::iterator_category());
+  }
+
+  // Iterator supports operator-, resize before inserting
+  template <class ForwardIterator>
+  void insert(ForwardIterator f, ForwardIterator l,
+              STL_NAMESPACE::forward_iterator_tag) {
+    size_type n = STL_NAMESPACE::distance(f, l);   // TODO(csilvers): standard?
+    resize_delta(n);
+    for ( ; n > 0; --n, ++f)
+      insert_noresize(*f);
+  }
+
+  // Arbitrary iterator, can't tell how much to resize
+  template <class InputIterator>
+  void insert(InputIterator f, InputIterator l,
+              STL_NAMESPACE::input_iterator_tag) {
+    for ( ; f != l; ++f)
+      insert(*f);
+  }
+#else
+  template <class InputIterator>
+  void insert(InputIterator f, InputIterator l) {
+    for ( ; f != l; ++f)
+      insert(*f);
+  }
+#endif
+
+
+  // DELETION ROUTINES
+  size_type erase(const key_type& key) {
+    const_iterator pos = find(key);   // shrug: shouldn't need to be const
+    if ( pos != end() ) {
+      assert(!test_deleted(pos));  // or find() shouldn't have returned it
+      set_deleted(pos);
+      ++num_deleted;
+      consider_shrink = true;      // will think about shrink after next insert
+      return 1;                    // because we deleted one thing
+    } else {
+      return 0;                    // because we deleted nothing
+    }
+  }
+
+  // This is really evil: really it should be iterator, not const_iterator.
+  // But...the only reason keys are const is to allow lookup.
+  // Since that's a moot issue for deleted keys, we allow const_iterators
+  void erase(const_iterator pos) {
+    if ( pos == end() ) return;    // sanity check
+    if ( set_deleted(pos) ) {      // true if object has been newly deleted
+      ++num_deleted;
+      consider_shrink = true;      // will think about shrink after next insert
+    }
+  }
+
+  void erase(const_iterator f, const_iterator l) {
+    for ( ; f != l; ++f) {
+      if ( set_deleted(f)  )       // should always be true
+        ++num_deleted;
+    }
+    consider_shrink = true;        // will think about shrink after next insert
+  }
+
+
+  // COMPARISON
+  bool operator==(const sparse_hashtable& ht) const {
+    // We really want to check that the hash functions are the same
+    // but alas there's no way to do this.  We just hope.
+    return ( num_deleted == ht.num_deleted && table == ht.table );
+  }
+  bool operator!=(const sparse_hashtable& ht) const {
+    return !(*this == ht);
+  }
+
+
+  // I/O
+  // We support reading and writing hashtables to disk.  NOTE that
+  // this only stores the hashtable metadata, not the stuff you've
+  // actually put in the hashtable!  Alas, since I don't know how to
+  // write a hasher or key_equal, you have to make sure everything
+  // but the table is the same.  We compact before writing.
+  bool write_metadata(FILE *fp) {
+    squash_deleted();           // so we don't have to worry about delkey
+    return table.write_metadata(fp);
+  }
+
+  bool read_metadata(FILE *fp) {
+    num_deleted = 0;            // since we got rid before writing
+    bool result = table.read_metadata(fp);
+    reset_thresholds();
+    return result;
+  }
+
+  bool write_nopointer_data(FILE *fp) {
+    return table.write_nopointer_data(fp);
+  }
+
+  bool read_nopointer_data(FILE *fp) {
+    return table.read_nopointer_data(fp);
+  }
+
+ private:
+  // The actual data
+  hasher hash;                      // required by hashed_associative_container
+  key_equal equals;
+  ExtractKey get_key;
+  size_type num_deleted;        // how many occupied buckets are marked deleted
+  bool use_deleted;                          // false until delkey has been set
+  key_type delkey;                           // which key marks deleted entries
+  sparsetable<value_type> table;      // holds num_buckets and num_elements too
+  size_type shrink_threshold;                    // table.size() * HT_EMPTY_FLT
+  size_type enlarge_threshold;               // table.size() * HT_OCCUPANCY_FLT
+  bool consider_shrink;   // true if we should try to shrink before next insert
+
+  void reset_thresholds() {
+    enlarge_threshold = static_cast<size_type>(table.size()*HT_OCCUPANCY_FLT);
+    shrink_threshold = static_cast<size_type>(table.size()*HT_EMPTY_FLT);
+    consider_shrink = false;   // whatever caused us to reset already considered
+  }
+};
+
+// We need a global swap as well
+template <class V, class K, class HF, class ExK, class EqK, class A>
+inline void swap(sparse_hashtable<V,K,HF,ExK,EqK,A> &x,
+                 sparse_hashtable<V,K,HF,ExK,EqK,A> &y) {
+  x.swap(y);
+}
+
+#undef JUMP_
+
+template <class V, class K, class HF, class ExK, class EqK, class A>
+const typename sparse_hashtable<V,K,HF,ExK,EqK,A>::size_type
+  sparse_hashtable<V,K,HF,ExK,EqK,A>::ILLEGAL_BUCKET;
+
+// How full we let the table get before we resize.  Knuth says .8 is
+// good -- higher causes us to probe too much, though saves memory
+template <class V, class K, class HF, class ExK, class EqK, class A>
+const float sparse_hashtable<V,K,HF,ExK,EqK,A>::HT_OCCUPANCY_FLT = 0.8f;
+
+// How empty we let the table get before we resize lower.
+// It should be less than OCCUPANCY_FLT / 2 or we thrash resizing
+template <class V, class K, class HF, class ExK, class EqK, class A>
+const float sparse_hashtable<V,K,HF,ExK,EqK,A>::HT_EMPTY_FLT = 0.4 *
+sparse_hashtable<V,K,HF,ExK,EqK,A>::HT_OCCUPANCY_FLT;
+
+_END_GOOGLE_NAMESPACE_
+
+#endif /* _SPARSEHASHTABLE_H_ */
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsehash/config.h.in
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsehash/config.h.in	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsehash/config.h.in	(revision 2162)
@@ -0,0 +1,118 @@
+/* src/google/sparsehash/config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Namespace for Google classes */
+#undef GOOGLE_NAMESPACE
+
+/* the namespace of hash_map */
+#undef HASH_NAMESPACE
+
+/* Define to 1 if you have the <ext/hash_fun.h> header file. */
+#undef HAVE_EXT_HASH_FUN_H
+
+/* define if the compiler has hash_map */
+#undef HAVE_EXT_HASH_MAP
+
+/* define if the compiler has hash_set */
+#undef HAVE_EXT_HASH_SET
+
+/* Define to 1 if you have the <ext/stl_hash_fun.h> header file. */
+#undef HAVE_EXT_STL_HASH_FUN_H
+
+/* Define to 1 if you have the <hash_fun.h> header file. */
+#undef HAVE_HASH_FUN_H
+
+/* define if the compiler has hash_map */
+#undef HAVE_HASH_MAP
+
+/* define if the compiler has hash_set */
+#undef HAVE_HASH_SET
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `memcpy' function. */
+#undef HAVE_MEMCPY
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* define if the compiler implements namespaces */
+#undef HAVE_NAMESPACES
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <stl_hash_fun.h> header file. */
+#undef HAVE_STL_HASH_FUN_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/utsname.h> header file. */
+#undef HAVE_SYS_UTSNAME_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if the system has the type `u_int16_t'. */
+#undef HAVE_U_INT16_T
+
+/* Define to 1 if the system has the type `__uint16'. */
+#undef HAVE___UINT16
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* the namespace where STL code like vector<> is defined */
+#undef STL_NAMESPACE
+
+/* does STL support iterator-tags? */
+#undef UNDERSTANDS_ITERATOR_TAGS
+
+/* Version number of package */
+#undef VERSION
+
+/* Stops putting the code inside the Google namespace */
+#undef _END_GOOGLE_NAMESPACE_
+
+/* Puts following code inside the Google namespace */
+#undef _START_GOOGLE_NAMESPACE_
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsehash/densehashtable.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsehash/densehashtable.h	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsehash/densehashtable.h	(revision 2162)
@@ -0,0 +1,898 @@
+// Copyright (c) 2005, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// ---
+// Author: Craig Silverstein
+//
+// A dense hashtable is a particular implementation of
+// a hashtable: one that is meant to minimize memory allocation.
+// It does this by using an array to store all the data.  We
+// steal a value from the key space to indicate "empty" array
+// elements (ie indices where no item lives) and another to indicate
+// "deleted" elements.
+//
+// (Note it is possible to change the value of the delete key
+// on the fly; you can even remove it, though after that point
+// the hashtable is insert_only until you set it again.  The empty
+// value however can't be changed.)
+//
+// This code is possibly a bit faster if the empty value is 0.
+//
+// To minimize allocation and pointer overhead, we use internal
+// probing, in which the hashtable is a single table, and collisions
+// are resolved by trying to insert again in another bucket.  The
+// most cache-efficient internal probing schemes are linear probing
+// (which suffers, alas, from clumping) and quadratic probing, which
+// is what we implement by default.
+//
+// Type requirements: T must be a Plain Old Data Type (POD Type), since
+// we use placement new but never call a destructor.  To ensure this,
+// you must defined a __type_traits struct for T if it is not a basic
+// type (see type_traits.h).  Also, those imposed by the requirements
+// of Random Access Container.
+//
+// You probably shouldn't use this code directly.  Use
+// <google/dense_hash_map> or <google/dense_hash_set> instead.
+
+// You can change the following below:
+// HT_OCCUPANCY_FLT      -- how full before we double size
+// HT_EMPTY_FLT          -- how empty before we halve size
+// HT_MIN_BUCKETS        -- default smallest bucket size
+//
+// How to decide what values to use?
+// HT_EMPTY_FLT's default of .4 * OCCUPANCY_FLT, is probably good.
+// HT_MIN_BUCKETS is probably unnecessary since you can specify
+// (indirectly) the starting number of buckets at construct-time.
+// For HT_OCCUPANCY_FLT, you can use this chart to try to trade-off
+// expected lookup time to the space taken up.  By default, this
+// code uses quadratic probing, though you can change it to linear
+// via _JUMP below if you really want to.
+//
+// From http://www.augustana.ca/~mohrj/courses/1999.fall/csc210/lecture_notes/hashing.html
+// NUMBER OF PROBES / LOOKUP       Successful            Unsuccessful
+// Quadratic collision resolution   1 - ln(1-L) - L/2    1/(1-L) - L - ln(1-L)
+// Linear collision resolution     [1+1/(1-L)]/2         [1+1/(1-L)2]/2
+//
+// -- HT_OCCUPANCY_FLT --         0.10  0.50  0.60  0.75  0.80  0.90  0.99
+// QUADRATIC COLLISION RES.
+//    probes/successful lookup    1.05  1.44  1.62  2.01  2.21  2.85  5.11
+//    probes/unsuccessful lookup  1.11  2.19  2.82  4.64  5.81  11.4  103.6
+// LINEAR COLLISION RES.
+//    probes/successful lookup    1.06  1.5   1.75  2.5   3.0   5.5   50.5
+//    probes/unsuccessful lookup  1.12  2.5   3.6   8.5   13.0  50.0  5000.0
+
+#ifndef _DENSEHASHTABLE_H_
+#define _DENSEHASHTABLE_H_
+
+// The probing method
+// Linear probing
+// #define JUMP_(key, num_probes)    ( 1 )
+// Quadratic-ish probing
+#define JUMP_(key, num_probes)    ( num_probes )
+
+
+// Hashtable class, used to implement the hashed associative containers
+// hash_set and hash_map.
+
+#include <google/sparsehash/config.h>
+#include <assert.h>
+#include <algorithm>            // For swap(), eg
+
+_START_GOOGLE_NAMESPACE_
+
+using STL_NAMESPACE::pair;
+
+template <class Value, class Key, class HashFcn,
+          class ExtractKey, class EqualKey, class Alloc>
+class dense_hashtable;
+
+template <class V, class K, class HF, class ExK, class EqK, class A>
+struct dense_hashtable_iterator;
+
+template <class V, class K, class HF, class ExK, class EqK, class A>
+struct dense_hashtable_const_iterator;
+
+// We're just an array, but we need to skip over empty and deleted elements
+template <class V, class K, class HF, class ExK, class EqK, class A>
+struct dense_hashtable_iterator {
+ public:
+  typedef dense_hashtable<V,K,HF,ExK,EqK,A>                dense_hashtable;
+  typedef dense_hashtable_iterator<V,K,HF,ExK,EqK,A>       iterator;
+  typedef dense_hashtable_const_iterator<V,K,HF,ExK,EqK,A> const_iterator;
+
+#ifdef UNDERSTANDS_ITERATOR_TAGS
+  typedef STL_NAMESPACE::forward_iterator_tag iterator_category;
+#endif
+  typedef V value_type;
+  typedef ptrdiff_t difference_type;
+  typedef size_t size_type;
+  typedef V& reference;                // Value
+  typedef V* pointer;
+
+  // "Real" constructor and default constructor
+  dense_hashtable_iterator(const dense_hashtable *h,
+                           pointer it, pointer it_end, bool advance)
+    : ht(h), pos(it), end(it_end)   {
+    if (advance)  advance_past_empty_and_deleted();
+  }
+  dense_hashtable_iterator() { }
+  // The default destructor is fine; we don't define one
+  // The default operator= is fine; we don't define one
+
+  // Happy dereferencer
+  reference operator*() const { return *pos; }
+  pointer operator->() const { return &(operator*()); }
+
+  // Arithmetic.  The only hard part is making sure that
+  // we're not on an empty or marked-deleted array element
+  void advance_past_empty_and_deleted() {
+    while ( pos != end && (ht->test_empty(*this) || ht->test_deleted(*this)) )
+      ++pos;
+  }
+  iterator& operator++()   {
+    assert(pos != end); ++pos; advance_past_empty_and_deleted(); return *this;
+  }
+  iterator operator++(int) { iterator tmp(*this); ++*this; return tmp; }
+
+  // Comparison.
+  bool operator==(const iterator& it) const { return pos == it.pos; }
+  bool operator!=(const iterator& it) const { return pos != it.pos; }
+
+
+  // The actual data
+  const dense_hashtable *ht;
+  pointer pos, end;
+};
+
+
+// Now do it all again, but with const-ness!
+template <class V, class K, class HF, class ExK, class EqK, class A>
+struct dense_hashtable_const_iterator {
+ public:
+  typedef dense_hashtable<V,K,HF,ExK,EqK,A>                dense_hashtable;
+  typedef dense_hashtable_iterator<V,K,HF,ExK,EqK,A>       iterator;
+  typedef dense_hashtable_const_iterator<V,K,HF,ExK,EqK,A> const_iterator;
+
+#ifdef UNDERSTANDS_ITERATOR_TAGS
+  typedef STL_NAMESPACE::forward_iterator_tag iterator_category;
+#endif
+  typedef V value_type;
+  typedef ptrdiff_t difference_type;
+  typedef size_t size_type;
+  typedef const V& reference;                // Value
+  typedef const V* pointer;
+
+  // "Real" constructor and default constructor
+  dense_hashtable_const_iterator(const dense_hashtable *h,
+                                 pointer it, pointer it_end, bool advance)
+    : ht(h), pos(it), end(it_end)   {
+    if (advance)  advance_past_empty_and_deleted();
+  }
+  dense_hashtable_const_iterator() { }
+  // This lets us convert regular iterators to const iterators
+  dense_hashtable_const_iterator(const iterator &it)
+    : ht(it.ht), pos(it.pos), end(it.end) { }
+  // The default destructor is fine; we don't define one
+  // The default operator= is fine; we don't define one
+
+  // Happy dereferencer
+  reference operator*() const { return *pos; }
+  pointer operator->() const { return &(operator*()); }
+
+  // Arithmetic.  The only hard part is making sure that
+  // we're not on an empty or marked-deleted array element
+  void advance_past_empty_and_deleted() {
+    while ( pos != end && (ht->test_empty(*this) || ht->test_deleted(*this)) )
+      ++pos;
+  }
+  const_iterator& operator++()   {
+    assert(pos != end); ++pos; advance_past_empty_and_deleted(); return *this;
+  }
+  const_iterator operator++(int) { iterator tmp(*this); ++*this; return tmp; }
+
+  // Comparison.
+  bool operator==(const const_iterator& it) const { return pos == it.pos; }
+  bool operator!=(const const_iterator& it) const { return pos != it.pos; }
+
+
+  // The actual data
+  const dense_hashtable *ht;
+  pointer pos, end;
+};
+
+template <class Value, class Key, class HashFcn,
+          class ExtractKey, class EqualKey, class Alloc>
+class dense_hashtable {
+ public:
+  typedef Key key_type;
+  typedef Value value_type;
+  typedef HashFcn hasher;
+  typedef EqualKey key_equal;
+
+  typedef size_t            size_type;
+  typedef ptrdiff_t         difference_type;
+  typedef value_type*       pointer;
+  typedef const value_type* const_pointer;
+  typedef value_type&       reference;
+  typedef const value_type& const_reference;
+  typedef dense_hashtable_iterator<Value, Key, HashFcn,
+                                   ExtractKey, EqualKey, Alloc>
+  iterator;
+
+  typedef dense_hashtable_const_iterator<Value, Key, HashFcn,
+                                          ExtractKey, EqualKey, Alloc>
+  const_iterator;
+
+  // How full we let the table get before we resize.  Knuth says .8 is
+  // good -- higher causes us to probe too much, though saves memory
+  static const float HT_OCCUPANCY_FLT; // = 0.8;
+
+  // How empty we let the table get before we resize lower.
+  // It should be less than OCCUPANCY_FLT / 2 or we thrash resizing
+  static const float HT_EMPTY_FLT; // = 0.4 * HT_OCCUPANCY_FLT
+
+  // Minimum size we're willing to let hashtables be.
+  // Must be a power of two, and at least 4.
+  // Note, however, that for a given hashtable, the minimum size is
+  // determined by the first constructor arg, and may be >HT_MIN_BUCKETS.
+  static const size_t HT_MIN_BUCKETS  = 32;
+
+
+  // ITERATOR FUNCTIONS
+  iterator begin()             { return iterator(this, table,
+                                                 table + num_buckets, true); }
+  iterator end()               { return iterator(this, table + num_buckets,
+                                                 table + num_buckets, true); }
+  const_iterator begin() const { return const_iterator(this, table,
+                                                       table+num_buckets,true);}
+  const_iterator end() const   { return const_iterator(this, table + num_buckets,
+                                                       table+num_buckets,true);}
+
+  // ACCESSOR FUNCTIONS for the things we templatize on, basically
+  hasher hash_funct() const { return hash; }
+  key_equal key_eq() const  { return equals; }
+
+  // Annoyingly, we can't copy values around, because they might have
+  // const components (they're probably pair<const X, Y>).  We use
+  // placement new to get around this.  Arg.
+ private:
+  void set_value(value_type* dst, const value_type src) {
+    new(dst) value_type(src);
+  }
+
+  void set_key(key_type* dst, const key_type src) {
+    new(dst) key_type(src);   // used for set_deleted_key(), etc
+  }
+
+  // DELETE HELPER FUNCTIONS
+  // This lets the user describe a key that will indicate deleted
+  // table entries.  This key should be an "impossible" entry --
+  // if you try to insert it for real, you won't be able to retrieve it!
+  // (NB: while you pass in an entire value, only the key part is looked
+  // at.  This is just because I don't know how to assign just a key.)
+ private:
+  void squash_deleted() {           // gets rid of any deleted entries we have
+    if ( num_deleted ) {            // get rid of deleted before writing
+      dense_hashtable tmp(*this);   // copying will get rid of deleted
+      swap(tmp);                    // now we are tmp
+    }
+    assert(num_deleted == 0);
+  }
+
+ public:
+  void set_deleted_key(const key_type &key) {
+    // It's only safe to change what "deleted" means if we purge deleted guys
+    squash_deleted();
+    use_deleted = true;
+    set_key(&delkey, key);            // save the key
+  }
+  void clear_deleted_key() {
+    squash_deleted();
+    use_deleted = false;
+  }
+
+  // These are public so the iterators can use them
+  // True if the item at position bucknum is "deleted" marker
+  bool test_deleted(size_type bucknum) const {
+    // The num_deleted test is crucial for read(): after read(), the ht values
+    // are garbage, and we don't want to think some of them are deleted.
+    return (use_deleted && num_deleted > 0 &&
+            equals(delkey, get_key(table[bucknum])));
+  }
+  bool test_deleted(const iterator &it) const {
+    return (use_deleted && num_deleted > 0 &&
+            equals(delkey, get_key(*it)));
+  }
+  bool test_deleted(const const_iterator &it) const {
+    return (use_deleted && num_deleted > 0 &&
+            equals(delkey, get_key(*it)));
+  }
+  // Set it so test_deleted is true.  true if object didn't used to be deleted
+  // See below (at erase()) to explain why we allow const_iterators
+  bool set_deleted(const_iterator &it) {
+    assert(use_deleted);             // bad if set_deleted_key() wasn't called
+    bool retval = !test_deleted(it);
+    set_key(const_cast<key_type*>(&get_key(*it)), delkey);
+    return retval;
+  }
+  // Set it so test_deleted is false.  true if object used to be deleted
+  bool clear_deleted(const_iterator &it) {
+    assert(use_deleted);             // bad if set_deleted_key() wasn't called
+    // happens automatically when we assign something else in its place
+    return test_deleted(it);
+  }
+
+  // EMPTY HELPER FUNCTIONS
+  // This lets the user describe a key that will indicate empty (unused)
+  // table entries.  This key should be an "impossible" entry --
+  // if you try to insert it for real, you won't be able to retrieve it!
+  // (NB: while you pass in an entire value, only the key part is looked
+  // at.  This is just because I don't know how to assign just a key.)
+ public:
+  // These are public so the iterators can use them
+  // True if the item at position bucknum is "empty" marker
+  bool test_empty(size_type bucknum) const {
+    assert(use_empty);              // we always need to know what's empty!
+    return equals(emptykey, get_key(table[bucknum]));
+  }
+  bool test_empty(const iterator &it) const {
+    assert(use_empty);              // we always need to know what's empty!
+    return equals(emptykey, get_key(*it));
+  }
+  bool test_empty(const const_iterator &it) const {
+    assert(use_empty);              // we always need to know what's empty!
+    return equals(emptykey, get_key(*it));
+  }
+
+ private:
+  // You can either set a range empty or an individual element
+  void set_empty(size_type bucknum) {
+    assert(use_empty);
+    set_key(const_cast<key_type*>(&get_key(table[bucknum])), emptykey);
+  }
+  void set_empty(size_type buckstart, size_type buckend) {
+    assert(use_empty);
+    if ( empty_is_zero )          // we can empty a lot of buckets at once
+      memset(table + buckstart, 0, (buckend-buckstart) * sizeof(*table));
+    else
+      for ( ; buckstart < buckend; buckstart++ )
+        set_empty(buckstart);
+  }
+
+ public:
+  void set_empty_key(const key_type &key) {
+    // Once you set the empty key, you can't change it
+    assert(!use_empty);
+    use_empty = true;
+    set_key(&emptykey, key);
+    empty_is_zero = true;                    // true if key is all 0's
+    for ( size_t i = 0; i < sizeof(emptykey); ++i )
+      if ( (reinterpret_cast<const char *>(&emptykey))[i] != 0 ) {
+        empty_is_zero = false;               // won't be able to optimize :-(
+        break;
+      }
+    empty_is_zero = false;                   // empty heuristic seems to hurt
+
+    assert(!table);                  // must set before first use
+    // num_buckets was set in constructor even though table was NULL
+    table = (value_type *) malloc(num_buckets * sizeof(*table));
+    assert(table);
+    set_empty(0, num_buckets);
+  }
+
+  // FUNCTIONS CONCERNING SIZE
+ public:
+  size_type size() const      { return num_elements - num_deleted; }
+  // Buckets are always a power of 2
+  size_type max_size() const  { return (size_type(-1) >> 1U) + 1; }
+  bool empty() const          { return size() == 0; }
+  size_type bucket_count() const      { return num_buckets; }
+  size_type max_bucket_count() const  { return max_size(); }
+
+ private:
+  // Because of the above, size_type(-1) is never legal; use it for errors
+  static const size_type ILLEGAL_BUCKET = size_type(-1);
+
+ private:
+  // This is the smallest size a hashtable can be without being too crowded
+  // If you like, you can give a min #buckets as well as a min #elts
+  size_type min_size(size_type num_elts, size_type min_buckets_wanted) {
+    size_type sz = HT_MIN_BUCKETS;             // min buckets allowed
+    while ( sz < min_buckets_wanted || num_elts >= sz * HT_OCCUPANCY_FLT )
+      sz *= 2;
+    return sz;
+  }
+
+  // Used after a string of deletes
+  void maybe_shrink() {
+    assert(num_elements >= num_deleted);
+    assert((bucket_count() & (bucket_count()-1)) == 0); // is a power of two
+    assert(bucket_count() >= HT_MIN_BUCKETS);
+
+    if ( (num_elements-num_deleted) <= shrink_threshold &&
+         bucket_count() > HT_MIN_BUCKETS ) {
+      size_type sz = bucket_count() / 2;    // find how much we should shrink
+      while ( sz > HT_MIN_BUCKETS &&
+              (num_elements - num_deleted) <= sz * HT_EMPTY_FLT )
+        sz /= 2;                            // stay a power of 2
+      dense_hashtable tmp(*this, sz);       // Do the actual resizing
+      swap(tmp);                            // now we are tmp
+    }
+    consider_shrink = false;                // because we just considered it
+  }
+
+  // We'll let you resize a hashtable -- though this makes us copy all!
+  // When you resize, you say, "make it big enough for this many more elements"
+  void resize_delta(size_type delta, size_type min_buckets_wanted = 0) {
+    if ( consider_shrink )                   // see if lots of deletes happened
+      maybe_shrink();
+    if ( bucket_count() > min_buckets_wanted &&
+         (num_elements + delta) <= enlarge_threshold )
+      return;                                // we're ok as we are
+
+    const size_type resize_to = min_size(num_elements + delta,
+                                         min_buckets_wanted);
+    if ( resize_to > bucket_count() ) {      // we don't have enough buckets
+      dense_hashtable tmp(*this, resize_to);
+      swap(tmp);                             // now we are tmp
+    }
+  }
+
+  // Used to actually do the rehashing when we grow/shrink a hashtable
+  void copy_from(const dense_hashtable &ht, size_type min_buckets_wanted = 0) {
+    clear();            // clear table, set num_deleted to 0
+
+    // If we need to change the size of our table, do it now
+    const size_type resize_to = min_size(ht.size(), min_buckets_wanted);
+    if ( resize_to > bucket_count() ) {      // we don't have enough buckets
+      table = (value_type *) realloc(table, resize_to * sizeof(*table));
+      assert(table != NULL);
+      set_empty(num_buckets, resize_to);     // empty everything between them
+      num_buckets = resize_to;
+      reset_thresholds();
+    }
+
+    // We use a normal iterator to get non-deleted bcks from ht
+    // We could use insert() here, but since we know there are
+    // no duplicates and no deleted items, we can be more efficient
+    assert((bucket_count() & (bucket_count()-1)) == 0);      // a power of two
+    for ( const_iterator it = ht.begin(); it != ht.end(); ++it ) {
+      size_type num_probes = 0;              // how many times we've probed
+      size_type bucknum;
+      const size_type bucket_count_minus_one = bucket_count() - 1;
+      for (bucknum = hash(get_key(*it)) & bucket_count_minus_one;
+           !test_empty(bucknum);                               // not empty
+           bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one) {
+        ++num_probes;
+        assert(num_probes < bucket_count()); // or else the hashtable is full
+      }
+      set_value(&table[bucknum], *it);       // copies the value to here
+      num_elements++;
+    }
+  }
+
+  // Required by the spec for hashed associative container
+ public:
+  // Though the docs say this should be num_buckets, I think it's much
+  // more useful as req_elements.  As a special feature, calling with
+  // req_elements==0 will cause us to shrink if we can, saving space.
+  void resize(size_type req_elements) {       // resize to this or larger
+    if ( consider_shrink || req_elements == 0 )
+      maybe_shrink();
+    if ( req_elements > num_elements )
+      return resize_delta(req_elements - num_elements, 0);
+  }
+
+
+  // CONSTRUCTORS -- as required by the specs, we take a size,
+  // but also let you specify a hashfunction, key comparator,
+  // and key extractor.  We also define a copy constructor and =.
+  // DESTRUCTOR -- needs to free the table
+  explicit dense_hashtable(size_type n = 0,
+                           const HashFcn& hf = HashFcn(),
+                           const EqualKey& eql = EqualKey(),
+                           const ExtractKey& ext = ExtractKey())
+    : hash(hf), equals(eql), get_key(ext), num_deleted(0),
+      use_deleted(false), use_empty(false),
+      empty_is_zero(false), delkey(), emptykey(),
+      table(NULL), num_buckets(min_size(0, n)), num_elements(0) {
+    // table is NULL until emptykey is set.  However, we set num_buckets
+    // here so we know how much space to allocate once emptykey is set
+    reset_thresholds();
+  }
+
+  // As a convenience for resize(), we allow an optional second argument
+  // which lets you make this new hashtable a different size than ht
+  dense_hashtable(const dense_hashtable& ht, size_type min_buckets_wanted = 0)
+    : hash(ht.hash), equals(ht.equals), get_key(ht.get_key), num_deleted(0),
+      use_deleted(ht.use_deleted), use_empty(ht.use_empty),
+      empty_is_zero(ht.empty_is_zero), delkey(ht.delkey), emptykey(ht.emptykey),
+      table(NULL), num_buckets(min_size(0, min_buckets_wanted)),
+      num_elements(0) {
+    reset_thresholds();
+    copy_from(ht, min_buckets_wanted);   // copy_from() ignores deleted entries
+  }
+
+  dense_hashtable& operator= (const dense_hashtable& ht) {
+    if (&ht == this)  return *this;        // don't copy onto ourselves
+    clear();
+    hash = ht.hash;
+    equals = ht.equals;
+    get_key = ht.get_key;
+    use_deleted = ht.use_deleted;
+    use_empty = ht.use_empty;
+    empty_is_zero = ht.empty_is_zero;
+    set_key(&delkey, ht.delkey);
+    set_key(&emptykey, ht.emptykey);
+    copy_from(ht);                         // sets num_deleted to 0 too
+    return *this;
+  }
+
+  ~dense_hashtable() {
+    if (table)  free(table);
+  }
+
+  // Many STL algorithms use swap instead of copy constructors
+  void swap(dense_hashtable& ht) {
+    STL_NAMESPACE::swap(hash, ht.hash);
+    STL_NAMESPACE::swap(equals, ht.equals);
+    STL_NAMESPACE::swap(get_key, ht.get_key);
+    STL_NAMESPACE::swap(num_deleted, ht.num_deleted);
+    STL_NAMESPACE::swap(use_deleted, ht.use_deleted);
+    STL_NAMESPACE::swap(use_empty, ht.use_empty);
+    STL_NAMESPACE::swap(empty_is_zero, ht.empty_is_zero);
+    { key_type tmp;     // for annoying reasons, swap() doesn't work
+      set_key(&tmp, delkey);
+      set_key(&delkey, ht.delkey);
+      set_key(&ht.delkey, tmp);
+    }
+    { key_type tmp;     // for annoying reasons, swap() doesn't work
+      set_key(&tmp, emptykey);
+      set_key(&emptykey, ht.emptykey);
+      set_key(&ht.emptykey, tmp);
+    }
+    STL_NAMESPACE::swap(table, ht.table);
+    STL_NAMESPACE::swap(num_buckets, ht.num_buckets);
+    STL_NAMESPACE::swap(num_elements, ht.num_elements);
+    reset_thresholds();
+    ht.reset_thresholds();
+  }
+
+  // It's always nice to be able to clear a table without deallocating it
+  void clear() {
+    num_buckets = min_size(0,0);          // our new size
+    reset_thresholds();
+    table = (value_type *) realloc(table, num_buckets * sizeof(*table));
+    assert(table);
+    set_empty(0, num_buckets);
+    num_elements = 0;
+    num_deleted = 0;
+  }
+
+
+  // LOOKUP ROUTINES
+ private:
+  // Returns a pair of positions: 1st where the object is, 2nd where
+  // it would go if you wanted to insert it.  1st is ILLEGAL_BUCKET
+  // if object is not found; 2nd is ILLEGAL_BUCKET if it is.
+  // Note: because of deletions where-to-insert is not trivial: it's the
+  // first deleted bucket we see, as long as we don't find the key later
+  pair<size_type, size_type> find_position(const key_type &key) const {
+    size_type num_probes = 0;              // how many times we've probed
+    const size_type bucket_count_minus_one = bucket_count() - 1;
+    size_type bucknum = hash(key) & bucket_count_minus_one;
+    size_type insert_pos = ILLEGAL_BUCKET; // where we would insert
+    while ( 1 ) {                          // probe until something happens
+      if ( test_empty(bucknum) ) {         // bucket is empty
+        if ( insert_pos == ILLEGAL_BUCKET )   // found no prior place to insert
+          return pair<size_type,size_type>(ILLEGAL_BUCKET, bucknum);
+        else
+          return pair<size_type,size_type>(ILLEGAL_BUCKET, insert_pos);
+
+      } else if ( test_deleted(bucknum) ) {// keep searching, but mark to insert
+        if ( insert_pos == ILLEGAL_BUCKET )
+          insert_pos = bucknum;
+
+      } else if ( equals(key, get_key(table[bucknum])) ) {
+        return pair<size_type,size_type>(bucknum, ILLEGAL_BUCKET);
+      }
+      ++num_probes;                        // we're doing another probe
+      bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one;
+      assert(num_probes < bucket_count()); // don't probe too many times!
+    }
+  }
+
+ public:
+  iterator find(const key_type& key) {
+    if ( size() == 0 ) return end();
+    pair<size_type, size_type> pos = find_position(key);
+    if ( pos.first == ILLEGAL_BUCKET )     // alas, not there
+      return end();
+    else
+      return iterator(this, table + pos.first, table + num_buckets, false);
+  }
+
+  const_iterator find(const key_type& key) const {
+    if ( size() == 0 ) return end();
+    pair<size_type, size_type> pos = find_position(key);
+    if ( pos.first == ILLEGAL_BUCKET )     // alas, not there
+      return end();
+    else
+      return const_iterator(this, table + pos.first, table+num_buckets, false);
+  }
+
+  // Counts how many elements have key key.  For maps, it's either 0 or 1.
+  size_type count(const key_type &key) const {
+    pair<size_type, size_type> pos = find_position(key);
+    return pos.first == ILLEGAL_BUCKET ? 0 : 1;
+  }
+
+  // Likewise, equal_range doesn't really make sense for us.  Oh well.
+  pair<iterator,iterator> equal_range(const key_type& key) {
+    const iterator pos = find(key);      // either an iterator or end
+    return pair<iterator,iterator>(pos, pos);
+  }
+  pair<const_iterator,const_iterator> equal_range(const key_type& key) const {
+    const const_iterator pos = find(key);      // either an iterator or end
+    return pair<iterator,iterator>(pos, pos);
+  }
+
+
+  // INSERTION ROUTINES
+ private:
+  // If you know *this is big enough to hold obj, use this routine
+  pair<iterator, bool> insert_noresize(const value_type& obj) {
+    const pair<size_type,size_type> pos = find_position(get_key(obj));
+    if ( pos.first != ILLEGAL_BUCKET) {      // object was already there
+      return pair<iterator,bool>(iterator(this, table + pos.first,
+                                          table + num_buckets, false),
+                                 false);          // false: we didn't insert
+    } else {                                 // pos.second says where to put it
+      if ( test_deleted(pos.second) ) {      // just replace if it's been del.
+        const_iterator delpos(this, table + pos.second,              // shrug:
+                              table + num_buckets, false);// shouldn't need const
+        clear_deleted(delpos);
+        assert( num_deleted > 0);
+        --num_deleted;                       // used to be, now it isn't
+      } else {
+        ++num_elements;                      // replacing an empty bucket
+      }
+      set_value(&table[pos.second], obj);
+      return pair<iterator,bool>(iterator(this, table + pos.second,
+                                          table + num_buckets, false),
+                                 true);           // true: we did insert
+    }
+  }
+
+ public:
+  // This is the normal insert routine, used by the outside world
+  pair<iterator, bool> insert(const value_type& obj) {
+    resize_delta(1);                      // adding an object, grow if need be
+    return insert_noresize(obj);
+  }
+
+  // When inserting a lot at a time, we specialize on the type of iterator
+  template <class InputIterator>
+  void insert(InputIterator f, InputIterator l) {
+    // specializes on iterator type
+    insert(f, l, typename STL_NAMESPACE::iterator_traits<InputIterator>::iterator_category());
+  }
+
+  // Iterator supports operator-, resize before inserting
+  template <class ForwardIterator>
+  void insert(ForwardIterator f, ForwardIterator l,
+              STL_NAMESPACE::forward_iterator_tag) {
+    size_type n = STL_NAMESPACE::distance(f, l);   // TODO(csilvers): standard?
+    resize_delta(n);
+    for ( ; n > 0; --n, ++f)
+      insert_noresize(*f);
+  }
+
+  // Arbitrary iterator, can't tell how much to resize
+  template <class InputIterator>
+  void insert(InputIterator f, InputIterator l,
+              STL_NAMESPACE::input_iterator_tag) {
+    for ( ; f != l; ++f)
+      insert(*f);
+  }
+
+  // DELETION ROUTINES
+  size_type erase(const key_type& key) {
+    const_iterator pos = find(key);   // shrug: shouldn't need to be const
+    if ( pos != end() ) {
+      assert(!test_deleted(pos));  // or find() shouldn't have returned it
+      set_deleted(pos);
+      ++num_deleted;
+      consider_shrink = true;      // will think about shrink after next insert
+      return 1;                    // because we deleted one thing
+    } else {
+      return 0;                    // because we deleted nothing
+    }
+  }
+
+  // This is really evil: really it should be iterator, not const_iterator.
+  // But...the only reason keys are const is to allow lookup.
+  // Since that's a moot issue for deleted keys, we allow const_iterators
+  void erase(const_iterator pos) {
+    if ( pos == end() ) return;    // sanity check
+    if ( set_deleted(pos) ) {      // true if object has been newly deleted
+      ++num_deleted;
+      consider_shrink = true;      // will think about shrink after next insert
+    }
+  }
+
+  void erase(const_iterator f, const_iterator l) {
+    for ( ; f != l; ++f) {
+      if ( set_deleted(f)  )       // should always be true
+        ++num_deleted;
+    }
+    consider_shrink = true;        // will think about shrink after next insert
+  }
+
+
+  // COMPARISON
+  bool operator==(const dense_hashtable& ht) const {
+    // We really want to check that the hash functions are the same
+    // but alas there's no way to do this.  We just hope.
+    return ( num_deleted == ht.num_deleted && table == ht.table );
+  }
+  bool operator!=(const dense_hashtable& ht) const {
+    return !(*this == ht);
+  }
+
+
+  // I/O
+  // We support reading and writing hashtables to disk.  Alas, since
+  // I don't know how to write a hasher or key_equal, you have to make
+  // sure everything but the table is the same.  We compact before writing
+  //
+  // NOTE: These functions are currently TODO.  They've not been implemented.
+  bool write_metadata(FILE *fp) {
+    squash_deleted();           // so we don't have to worry about delkey
+    return false;               // TODO
+  }
+
+  bool read_metadata(FILE *fp) {
+    num_deleted = 0;            // since we got rid before writing
+    assert(use_empty);          // have to set this before calling us
+    if (table)  free(table);    // we'll make our own
+    // TODO: read magic number
+    // TODO: read num_buckets
+    reset_thresholds();
+    table = (value_type *) malloc(num_buckets * sizeof(*table));
+    assert(table);
+    set_empty(0, num_buckets);
+    // TODO: read num_elements
+    for ( size_type i = 0; i < num_elements; ++i ) {
+      // TODO: read bucket_num
+      // TODO: set with non-empty, non-deleted value
+    }
+    return false;               // TODO
+  }
+
+  // If your keys and values are simple enough, we can write them
+  // to disk for you.  "simple enough" means no pointers.
+  // However, we don't try to normalize endianness
+  bool write_nopointer_data(FILE *fp) const {
+    for ( const_iterator it = begin(); it != end(); ++it ) {
+      // TODO: skip empty/deleted values
+      if ( !fwrite(&*it, sizeof(*it), 1, fp) )  return false;
+    }
+    return false;        // TODO
+  }
+
+  // When reading, we have to override the potential const-ness of *it
+  bool read_nopointer_data(FILE *fp) {
+    for ( iterator it = begin(); it != end(); ++it ) {
+      // TODO: skip empty/deleted values
+      if ( !fread(reinterpret_cast<void*>(&(*it)), sizeof(*it), 1, fp) )
+        return false;
+    }
+    return false;        // TODO
+  }
+
+ private:
+  // We need to enforce that our value_type is a Plain Old Data Type
+  // (so we know realloc and memmove will work).  We use traits to
+  // enforce this.  The following gives a compile-time error if
+  // is_POD_type is false (which is the default for user types).
+  //
+  // IF YOU GET AN ERROR HERE, make sure your class is a POD type,
+  // and if so tell the compiler via code similar to this:
+  // template<> struct __type_traits<classname> {
+  //   typedef __true_type    has_trivial_default_constructor;
+  //   typedef __true_type    has_trivial_copy_constructor;
+  //   typedef __true_type    has_trivial_assignment_operator;
+  //   typedef __true_type    has_trivial_destructor;
+  //   typedef __true_type    is_POD_type;
+  // };
+  //
+  // If this is part of a hash_map, you need to make sure both the
+  // Key and Value types are POD types, if they're user-defined.
+#ifdef UNDERSTANDS_TYPE_TRAITS
+  static __true_type * const enforce_pod;
+#endif
+
+  // The actual data
+  hasher hash;                      // required by hashed_associative_container
+  key_equal equals;
+  ExtractKey get_key;
+  size_type num_deleted;        // how many occupied buckets are marked deleted
+  bool use_deleted;                          // false until delkey has been set
+  bool use_empty;                          // you must do this before you start
+  bool empty_is_zero;                   // can optimize this case when emptying
+  key_type delkey;                           // which key marks deleted entries
+  key_type emptykey;                          // which key marks unused entries
+  value_type *table;
+  size_type num_buckets;
+  size_type num_elements;
+  size_type shrink_threshold;                     // num_buckets * HT_EMPTY_FLT
+  size_type enlarge_threshold;                // num_buckets * HT_OCCUPANCY_FLT
+  bool consider_shrink;   // true if we should try to shrink before next insert
+
+  void reset_thresholds() {
+    enlarge_threshold = static_cast<size_type>(num_buckets*HT_OCCUPANCY_FLT);
+    shrink_threshold = static_cast<size_type>(num_buckets*HT_EMPTY_FLT);
+    consider_shrink = false;   // whatever caused us to reset already considered
+  }
+};
+
+// We need a global swap as well
+template <class V, class K, class HF, class ExK, class EqK, class A>
+inline void swap(dense_hashtable<V,K,HF,ExK,EqK,A> &x,
+                 dense_hashtable<V,K,HF,ExK,EqK,A> &y) {
+  x.swap(y);
+}
+
+#ifdef UNDERSTANDS_TYPE_TRAITS
+template <class V, class K, class HF, class ExK, class EqK, class A>
+__true_type * const dense_hashtable<V,K,HF,ExK,EqK,A>::enforce_pod =
+static_cast<typename __type_traits<value_type>::is_POD_type *>(0);
+#endif
+
+#undef JUMP_
+
+template <class V, class K, class HF, class ExK, class EqK, class A>
+const typename dense_hashtable<V,K,HF,ExK,EqK,A>::size_type
+  dense_hashtable<V,K,HF,ExK,EqK,A>::ILLEGAL_BUCKET;
+
+// How full we let the table get before we resize.  Knuth says .8 is
+// good -- higher causes us to probe too much, though saves memory
+template <class V, class K, class HF, class ExK, class EqK, class A>
+const float dense_hashtable<V,K,HF,ExK,EqK,A>::HT_OCCUPANCY_FLT = 0.5f;
+
+// How empty we let the table get before we resize lower.
+// It should be less than OCCUPANCY_FLT / 2 or we thrash resizing
+template <class V, class K, class HF, class ExK, class EqK, class A>
+const float dense_hashtable<V,K,HF,ExK,EqK,A>::HT_EMPTY_FLT = 0.4 *
+dense_hashtable<V,K,HF,ExK,EqK,A>::HT_OCCUPANCY_FLT;
+
+_END_GOOGLE_NAMESPACE_
+
+#endif /* _DENSEHASHTABLE_H_ */
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsehash/hash_fun.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsehash/hash_fun.h	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsehash/hash_fun.h	(revision 2162)
@@ -0,0 +1,9 @@
+#ifndef WIN32
+#ifndef HASH_NAMESPACE
+#define HASH_NAMESPACE __gnu_cxx
+#endif
+
+#include <ext/stl_hash_fun.h>
+#else
+#include <./windows/stl_hash_fun.h>
+#endif
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsehash/config.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsehash/config.h	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsehash/config.h	(revision 2162)
@@ -0,0 +1,146 @@
+/* src/google/sparsehash/config.h.  Generated by configure.  */
+/* src/google/sparsehash/config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Namespace for Google classes */
+#define GOOGLE_NAMESPACE google
+
+/* the namespace of hash_map */
+#ifndef WIN32
+#define HASH_NAMESPACE __gnu_cxx
+#endif
+
+/* Define to 1 if you have the <ext/hash_fun.h> header file. */
+/* #undef HAVE_EXT_HASH_FUN_H */
+
+/* define if the compiler has hash_map */
+#define HAVE_EXT_HASH_MAP 1
+
+/* define if the compiler has hash_set */
+#define HAVE_EXT_HASH_SET 1
+
+/* Define to 1 if you have the <ext/stl_hash_fun.h> header file. */
+#define HAVE_EXT_STL_HASH_FUN_H 1
+
+/* Define to 1 if you have the <hash_fun.h> header file. */
+/* #undef HAVE_HASH_FUN_H */
+
+/* define if the compiler has hash_map */
+/* #undef HAVE_HASH_MAP */
+
+/* define if the compiler has hash_set */
+/* #undef HAVE_HASH_SET */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#ifndef WIN32
+#define HAVE_INTTYPES_H 1
+#endif
+
+/* Define to 1 if you have the `memcpy' function. */
+#define HAVE_MEMCPY 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* define if the compiler implements namespaces */
+#define HAVE_NAMESPACES 
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#ifndef WIN32
+#define HAVE_STDINT_H 1
+#endif
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <stl_hash_fun.h> header file. */
+/* #undef HAVE_STL_HASH_FUN_H */
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#ifndef WIN32
+#define HAVE_SYS_RESOURCE_H 1
+#endif
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#ifndef WIN32
+#define HAVE_SYS_TIME_H 1
+#else
+#define snprintf _snprintf
+#endif
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#ifndef WIN32
+#define HAVE_SYS_TYPES_H 1
+#endif
+
+/* Define to 1 if you have the <sys/utsname.h> header file. */
+#ifndef WIN32
+#define HAVE_SYS_UTSNAME_H 1
+#endif
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#ifndef WIN32
+#define HAVE_UNISTD_H 1
+#endif
+
+/* Define to 1 if the system has the type `u_int16_t'. */
+#ifdef WIN32
+#define HAVE_U_INT16_T 1
+#endif
+
+/* Define to 1 if the system has the type `__uint16'. */
+/* #undef HAVE___UINT16 */
+
+/* Name of package */
+//#define PACKAGE "sparsehash"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "opensource@google.com"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "sparsehash"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "sparsehash 0.3"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "sparsehash"
+
+/* Define to the version of this package. */
+//#define PACKAGE_VERSION "0.3"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* the namespace where STL code like vector<> is defined */
+#define STL_NAMESPACE std
+
+/* does STL support iterator-tags? */
+#define UNDERSTANDS_ITERATOR_TAGS 1
+
+/* Version number of package */
+//#define VERSION "0.3"
+
+/* Stops putting the code inside the Google namespace */
+#define _END_GOOGLE_NAMESPACE_ };
+
+/* Puts following code inside the Google namespace */
+#define _START_GOOGLE_NAMESPACE_ namespace GOOGLE_NAMESPACE {
+
+#ifdef WIN32
+typedef unsigned short uint16_t;
+typedef short int16_t;
+#undef HASH_NAMESPACE
+#define HASH_NAMESPACE std
+#endif
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsetable
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsetable	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparsetable	(revision 2162)
@@ -0,0 +1,1394 @@
+// Copyright (c) 2005, Google Inc.
+// All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+// 
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+// 
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// ---
+// Author: Craig Silverstein
+//
+// A sparsetable is a random container that implements a sparse array,
+// that is, an array that uses very little memory to store unassigned
+// indices (in this case, between 1-2 bits per unassigned index).  For
+// instance, if you allocate an array of size 5 and assign a[2] = <big
+// struct>, then a[2] will take up a lot of memory but a[0], a[1],
+// a[3], and a[4] will not.  Array elements that have a value are
+// called "assigned".  Array elements that have no value yet, or have
+// had their value cleared using erase() or clear(), are called
+// "unassigned".
+//
+// Unassigned values seem to have the default value of T (see below).
+// Nevertheless, there is a difference between an unassigned index and
+// one explicitly assigned the value of T().  The latter is considered
+// assigned.
+//
+// Access to an array element is constant time, as is insertion and
+// deletion.  Insertion and deletion may be fairly slow, however:
+// because of this container's memory economy, each insert and delete
+// causes a memory reallocation.
+//
+// See /usr/(local/)?doc/sparsehash-0.1/sparsetable.html
+// for information about how to use this class.
+
+#ifndef _SPARSETABLE_H_
+#define _SPARSETABLE_H_
+
+#include <google/sparsehash/config.h>
+#include <stdlib.h>             // for malloc/free
+#include <stdio.h>              // to read/write tables
+#if defined HAVE_STDINT_H
+#include <stdint.h>             // to get uint16_t (ISO naming madness)
+#elif defined HAVE_INTTYPES_H
+#include <inttypes.h>           // another place uint16_t might be defined
+#else
+#include <sys/types.h>          // our last best hope
+#endif
+#include <assert.h>             // for bounds checking
+#include <iterator>             // to define reverse_iterator<> for me
+#include <vector>               // a sparsetable is a vector of groups
+
+#if STDC_HEADERS
+#include <string.h>             // for memcpy and mmemmove
+#else
+#if !HAVE_MEMCPY
+#define memcpy(d, s, n)   bcopy ((s), (d), (n))
+#define memmove(d, s, n)  bcopy ((s), (d), (n))
+#endif
+#endif
+
+#if !defined HAVE_U_INT16_T && defined HAVE___UINT16
+typedef __uint16 u_int16_t        // true on vc++7
+#endif
+
+_START_GOOGLE_NAMESPACE_
+
+using STL_NAMESPACE::vector;
+
+// The smaller this is, the faster lookup is (because the group bitmap is
+// smaller) and the faster insert is, because there's less to memmove.
+// On the other hand, there are more groups.  Since group::size_type is
+// a short, this number should be of the form 32*x + 16 to avoid waste.
+static const uint16_t DEFAULT_SPARSEGROUP_SIZE = 48;   // fits in 1.5 words
+
+
+// A NOTE ON ASSIGNING:
+// A sparse table does not actually allocate memory for entries
+// that are not filled.  Because of this, it becomes complicated
+// to have a non-const iterator: we don't know, if the iterator points
+// to a not-filled bucket, whether you plan to fill it with something
+// or whether you plan to read its value (in which case you'll get
+// the default bucket value).  Therefore, while we can define const
+// operations in a pretty 'normal' way, for non-const operations, we
+// define something that returns a helper object with operator= and
+// operator& that allocate a bucket lazily.  We use this for table[]
+// and also for regular table iterators.
+
+template <class tabletype>
+class table_element_adaptor {
+ public:
+  typedef typename tabletype::value_type value_type;
+  typedef typename tabletype::size_type size_type;
+  typedef typename tabletype::reference reference;
+  typedef typename tabletype::pointer pointer;
+
+  table_element_adaptor(tabletype *tbl, size_type p) 
+    : table(tbl), pos(p) { }
+  table_element_adaptor& operator= (value_type val) { 
+    table->set(pos, val);
+    return *this;
+  }
+  operator value_type() { return table->get(pos); }   // we look like a value
+  pointer operator& () { return &table->mutating_get(pos); }
+
+ private:
+  tabletype* table;
+  size_type pos;
+};
+
+// Our iterator as simple as iterators can be: basically it's just
+// the index into our table.  Dereference, the only complicated
+// thing, we punt to the table class.  This just goes to show how
+// much machinery STL requires to do even the most trivial tasks.
+//
+// By templatizing over tabletype, we have one iterator type which
+// we can use for both sparsetables and sparsebins.  In fact it
+// works on any class that allows size() and operator[] (eg vector),
+// as long as it does the standard STL typedefs too (eg value_type).
+
+template <class tabletype>
+class table_iterator {
+ public:
+  typedef table_iterator iterator;
+
+#ifdef UNDERSTANDS_ITERATOR_TAGS
+  typedef STL_NAMESPACE::random_access_iterator_tag iterator_category;
+#endif
+  typedef typename tabletype::value_type value_type;
+  typedef typename tabletype::difference_type difference_type;
+  typedef typename tabletype::size_type size_type;
+  typedef table_element_adaptor<tabletype> reference;
+  typedef table_element_adaptor<tabletype>* pointer;
+
+  // The "real" constructor
+  table_iterator(tabletype *tbl, size_type p)
+    : table(tbl), pos(p) { }
+  // The default constructor, used when I define vars of type table::iterator
+  table_iterator() : table(NULL), pos(0) { }
+  // The copy constructor, for when I say table::iterator foo = tbl.begin()
+  // The default destructor is fine; we don't define one
+  // The default operator= is fine; we don't define one
+
+  // The main thing our iterator does is dereference.  If the table entry
+  // we point to is empty, we return the default value type.
+  // This is the big different function from the const iterator.
+  reference operator*()              {
+    return table_element_adaptor<tabletype>(table, pos);
+  }
+  pointer operator->()               { return &(operator*()); }
+
+  // Helper function to assert things are ok; eg pos is still in range
+  void check() const {
+    assert(table);
+    assert(pos <= table->size());
+  }
+
+  // Arithmetic: we just do arithmetic on pos.  We don't even need to 
+  // do bounds checking, since STL doesn't consider that it's job.  :-)
+  iterator& operator+=(size_type t) { pos += t; check(); return *this; }
+  iterator& operator-=(size_type t) { pos -= t; check(); return *this; }
+  iterator& operator++()            { ++pos; check(); return *this; }
+  iterator& operator--()            { --pos; check(); return *this; }
+  iterator operator++(int)          { iterator tmp(*this);     // for x++
+                                      ++pos; check(); return tmp; }
+  iterator operator--(int)          { iterator tmp(*this);     // for x--
+                                      --pos; check(); return tmp; }
+  iterator operator+(difference_type i) const  { iterator tmp(*this);
+                                                 tmp += i; return tmp; }
+  iterator operator-(difference_type i) const  { iterator tmp(*this);
+                                                 tmp -= i; return tmp; }
+  difference_type operator-(iterator it) const {      // for "x = it2 - it"
+    assert(table == it.table);
+    return pos - it.pos;
+  }
+  reference operator[](difference_type n) const {
+    return *(*this + n);            // simple though not totally efficient
+  }
+
+  // Comparisons.
+  bool operator==(const iterator& it) const {
+    return table == it.table && pos == it.pos;
+  }
+  bool operator<(const iterator& it) const {
+    assert(table == it.table);              // life is bad bad bad otherwise
+    return pos < it.pos;
+  }
+  bool operator<=(const iterator& it) const {
+    assert(table == it.table);
+    return pos <= it.pos;
+  }
+  bool operator!=(const iterator& it) const { return !(*this == it); }
+  bool operator>(const iterator& it) const { return it <= *this; }
+  bool operator>=(const iterator& it) const { return it < *this; }
+
+  // Here's the info we actually need to be an iterator
+  tabletype *table;              // so we can dereference and bounds-check
+  size_type pos;                 // index into the table
+};
+
+// support for "3 + iterator" has to be defined outside the class, alas
+template<class T>
+table_iterator<T> operator+(typename table_iterator<T>::difference_type i,
+                            table_iterator<T> it) {
+  return it + i;               // so people can say it2 = 3 + it
+}
+
+template <class tabletype>
+class const_table_iterator {
+ public:
+  typedef table_iterator<tabletype> iterator;
+  typedef const_table_iterator const_iterator;
+
+#ifdef UNDERSTANDS_ITERATOR_TAGS
+  typedef STL_NAMESPACE::random_access_iterator_tag iterator_category;
+#endif
+  typedef typename tabletype::value_type value_type;
+  typedef typename tabletype::difference_type difference_type;
+  typedef typename tabletype::size_type size_type;
+  typedef typename tabletype::const_reference reference;  // we're const-only
+  typedef typename tabletype::const_pointer pointer;
+
+  // The "real" constructor
+  const_table_iterator(const tabletype *tbl, size_type p)
+    : table(tbl), pos(p) { }
+  // The default constructor, used when I define vars of type table::iterator
+  const_table_iterator() : table(NULL), pos(0) { }
+  // The copy constructor, for when I say table::iterator foo = tbl.begin()
+  // Also converts normal iterators to const iterators
+  const_table_iterator(const iterator &from)
+    : table(from.table), pos(from.pos) { }
+  // The default destructor is fine; we don't define one
+  // The default operator= is fine; we don't define one
+
+  // The main thing our iterator does is dereference.  If the table entry
+  // we point to is empty, we return the default value type.
+  reference operator*() const       { return (*table)[pos]; }
+  pointer operator->() const        { return &(operator*()); }
+
+  // Helper function to assert things are ok; eg pos is still in range
+  void check() const {
+    assert(table);
+    assert(pos <= table->size());
+  }
+
+  // Arithmetic: we just do arithmetic on pos.  We don't even need to 
+  // do bounds checking, since STL doesn't consider that it's job.  :-)
+  const_iterator& operator+=(size_type t) { pos += t; check(); return *this; }
+  const_iterator& operator-=(size_type t) { pos -= t; check(); return *this; }
+  const_iterator& operator++()            { ++pos; check(); return *this; }
+  const_iterator& operator--()            { --pos; check(); return *this; }
+  const_iterator operator++(int)          { const_iterator tmp(*this); // for x++
+                                            ++pos; check(); return tmp; }
+  const_iterator operator--(int)          { const_iterator tmp(*this); // for x--
+                                            --pos; check(); return tmp; }
+  const_iterator operator+(difference_type i) const  { const_iterator tmp(*this);
+                                                       tmp += i; return tmp; }
+  const_iterator operator-(difference_type i) const  { const_iterator tmp(*this);
+                                                       tmp -= i; return tmp; }
+  difference_type operator-(const_iterator it) const {   // for "x = it2 - it"
+    assert(table == it.table);
+    return pos - it.pos;
+  }
+  reference operator[](difference_type n) const {
+    return *(*this + n);            // simple though not totally efficient
+  }
+
+  // Comparisons.
+  bool operator==(const const_iterator& it) const {
+    return table == it.table && pos == it.pos;
+  }
+  bool operator<(const const_iterator& it) const {
+    assert(table == it.table);              // life is bad bad bad otherwise
+    return pos < it.pos;
+  }
+  bool operator<=(const const_iterator& it) const {
+    assert(table == it.table);
+    return pos <= it.pos;
+  }
+  bool operator!=(const const_iterator& it) const { return !(*this == it); }
+  bool operator>(const const_iterator& it) const { return it <= *this; }
+  bool operator>=(const const_iterator& it) const { return it < *this; }
+
+  // Here's the info we actually need to be an iterator
+  const tabletype *table;        // so we can dereference and bounds-check
+  size_type pos;                 // index into the table
+};
+
+// support for "3 + iterator" has to be defined outside the class, alas
+template<class T>
+const_table_iterator<T> operator+(typename 
+                                  const_table_iterator<T>::difference_type i,
+                                  const_table_iterator<T> it) {
+  return it + i;               // so people can say it2 = 3 + it
+}
+
+
+// ---------------------------------------------------------------------------
+
+
+/*
+// This is a 2-D iterator.  You specify a begin and end over a list
+// of *containers*.  We iterate over each container by iterating over
+// it.  It's actually simple:                                    
+// VECTOR.begin() VECTOR[0].begin()  --------> VECTOR[0].end() ---\ 
+//     |          ________________________________________________/
+//     |          \_> VECTOR[1].begin()  -------->  VECTOR[1].end() -\ 
+//     |          ___________________________________________________/
+//     v          \_> ......
+// VECTOR.end()
+//
+// It's impossible to do random access on one of these things in constant
+// time, so it's just a bidirectional iterator.
+//
+// Unfortunately, because we need to use this for a non-empty iterator,
+// we use nonempty_begin() and nonempty_end() instead of begin() and end()
+// (though only going across, not down).
+*/
+
+#define TWOD_BEGIN_      nonempty_begin
+#define TWOD_END_        nonempty_end
+#define TWOD_ITER_       nonempty_iterator
+#define TWOD_CONST_ITER_ const_nonempty_iterator
+
+template <class containertype>
+class two_d_iterator {
+ public:
+  typedef two_d_iterator iterator;
+
+#ifdef UNDERSTANDS_ITERATOR_TAGS
+  typedef STL_NAMESPACE::bidirectional_iterator_tag iterator_category;
+#endif
+  // apparently some versions of VC++ have trouble with two ::'s in a typename
+  typedef typename containertype::value_type _tmp_vt;
+  typedef typename _tmp_vt::value_type value_type;
+  typedef typename _tmp_vt::difference_type difference_type;
+  typedef typename _tmp_vt::reference reference;
+  typedef typename _tmp_vt::pointer pointer;
+
+  // The "real" constructor.  begin and end specify how many rows we have
+  // (in the diagram above); we always iterate over each row completely.
+  two_d_iterator(typename containertype::iterator begin, 
+                 typename containertype::iterator end,
+                 typename containertype::iterator curr)
+    : row_begin(begin), row_end(end), row_current(curr), col_current() {
+    if ( row_current != row_end ) {
+      col_current = row_current->TWOD_BEGIN_();
+      advance_past_end();                 // in case cur->begin() == cur->end()
+    }
+  }
+  // If you want to start at an arbitrary place, you can, I guess
+  two_d_iterator(typename containertype::iterator begin, 
+                 typename containertype::iterator end,
+                 typename containertype::iterator curr,
+                 typename containertype::value_type::TWOD_ITER_ col)
+    : row_begin(begin), row_end(end), row_current(curr), col_current(col) {
+    advance_past_end();                 // in case cur->begin() == cur->end()
+  }
+  // The default constructor, used when I define vars of type table::iterator
+  two_d_iterator() : row_begin(), row_end(), row_current(), col_current() { }
+  // The default destructor is fine; we don't define one
+  // The default operator= is fine; we don't define one
+
+  // Happy dereferencer
+  reference operator*() const    { return *col_current; }
+  pointer operator->() const     { return &(operator*()); }
+
+  // Arithmetic: we just do arithmetic on pos.  We don't even need to 
+  // do bounds checking, since STL doesn't consider that it's job.  :-)
+  // NOTE: this is not amortized constant time!  What do we do about it?
+  void advance_past_end() {          // used when col_current points to end()
+    while ( col_current == row_current->TWOD_END_() ) {  // end of current row
+      ++row_current;                                // go to beginning of next
+      if ( row_current != row_end )                 // col is irrelevant at end
+        col_current = row_current->TWOD_BEGIN_();         
+      else                                          
+        break;                                      // don't go past row_end
+    } 
+  } 
+ 
+  iterator& operator++() { 
+    assert(row_current != row_end);                 // how to ++ from there?
+    ++col_current;
+    advance_past_end();                 // in case col_current is at end()
+    return *this;
+  }
+  iterator& operator--() {
+    while ( row_current == row_end ||
+            col_current == row_current->TWOD_BEGIN_() ) {
+      assert(row_current != row_begin);
+      --row_current;
+      col_current = row_current->TWOD_END_();             // this is 1 too far
+    }
+    --col_current;
+    return *this;
+  }
+  iterator operator++(int)       { iterator tmp(*this); ++*this; return tmp; }
+  iterator operator--(int)       { iterator tmp(*this); --*this; return tmp; }
+
+
+  // Comparisons.
+  bool operator==(const iterator& it) const {
+    return ( row_begin == it.row_begin &&
+             row_end == it.row_end &&
+             row_current == it.row_current &&
+             (row_current == row_end || col_current == it.col_current) );
+  }
+  bool operator!=(const iterator& it) const { return !(*this == it); }
+
+
+  // Here's the info we actually need to be an iterator
+  // These need to be public so we convert from iterator to const_iterator
+  typename containertype::iterator row_begin, row_end, row_current;
+  typename containertype::value_type::TWOD_ITER_ col_current;
+};
+
+// The same thing again, but this time const.  :-(
+template <class containertype>
+class const_two_d_iterator {
+ public:
+  typedef const_two_d_iterator iterator;
+
+#ifdef UNDERSTANDS_ITERATOR_TAGS
+  typedef STL_NAMESPACE::bidirectional_iterator_tag iterator_category;
+#endif
+  // apparently some versions of VC++ have trouble with two ::'s in a typename
+  typedef typename containertype::value_type _tmp_vt;
+  typedef typename _tmp_vt::value_type value_type;
+  typedef typename _tmp_vt::difference_type difference_type;
+  typedef typename _tmp_vt::const_reference reference;
+  typedef typename _tmp_vt::const_pointer pointer;
+
+  const_two_d_iterator(typename containertype::const_iterator begin, 
+                       typename containertype::const_iterator end,
+                       typename containertype::const_iterator curr)
+    : row_begin(begin), row_end(end), row_current(curr), col_current() {
+    if ( curr != end ) {
+      col_current = curr->TWOD_BEGIN_();
+      advance_past_end();                 // in case cur->begin() == cur->end()
+    }
+  }
+  const_two_d_iterator(typename containertype::const_iterator begin, 
+                       typename containertype::const_iterator end,
+                       typename containertype::const_iterator curr,
+                       typename containertype::value_type::TWOD_CONST_ITER_ col)
+    : row_begin(begin), row_end(end), row_current(curr), col_current(col) {
+    advance_past_end();                 // in case cur->begin() == cur->end()
+  }
+  const_two_d_iterator() 
+    : row_begin(), row_end(), row_current(), col_current() {
+  }
+  // Need this explicitly so we can convert normal iterators to const iterators
+  const_two_d_iterator(const two_d_iterator<containertype>& it) :
+    row_begin(it.row_begin), row_end(it.row_end), row_current(it.row_current),
+    col_current(it.col_current) { }
+
+  typename containertype::const_iterator row_begin, row_end, row_current;
+  typename containertype::value_type::TWOD_CONST_ITER_ col_current;
+
+
+  // EVERYTHING FROM HERE DOWN IS THE SAME AS THE NON-CONST ITERATOR
+  reference operator*() const    { return *col_current; }
+  pointer operator->() const     { return &(operator*()); }
+
+  void advance_past_end() {          // used when col_current points to end()
+    while ( col_current == row_current->TWOD_END_() ) {  // end of current row
+      ++row_current;                                // go to beginning of next
+      if ( row_current != row_end )                 // col is irrelevant at end
+        col_current = row_current->TWOD_BEGIN_();         
+      else                                          
+        break;                                      // don't go past row_end
+    } 
+  } 
+  iterator& operator++() { 
+    assert(row_current != row_end);                 // how to ++ from there?
+    ++col_current;
+    advance_past_end();                 // in case col_current is at end()
+    return *this;
+  }
+  iterator& operator--() {
+    while ( row_current == row_end ||
+            col_current == row_current->TWOD_BEGIN_() ) {
+      assert(row_current != row_begin);
+      --row_current;
+      col_current = row_current->TWOD_END_();             // this is 1 too far
+    }
+    --col_current;
+    return *this;
+  }
+  iterator operator++(int)       { iterator tmp(*this); ++*this; return tmp; }
+  iterator operator--(int)       { iterator tmp(*this); --*this; return tmp; }
+
+  bool operator==(const iterator& it) const {
+    return ( row_begin == it.row_begin &&
+             row_end == it.row_end &&
+             row_current == it.row_current &&
+             (row_current == row_end || col_current == it.col_current) );
+  }
+  bool operator!=(const iterator& it) const { return !(*this == it); }
+};
+
+// We provide yet another version, to be as frugal with memory as
+// possible.  This one frees each block of memory as it finishes
+// iterating over it.  By the end, the entire table is freed.
+// For understandable reasons, you can only iterate over it once,
+// which is why it's an input iterator
+template <class containertype>
+class destructive_two_d_iterator {
+ public:
+  typedef destructive_two_d_iterator iterator;
+
+#ifdef UNDERSTANDS_ITERATOR_TAGS
+  typedef STL_NAMESPACE::input_iterator_tag iterator_category;
+#endif
+  // apparently some versions of VC++ have trouble with two ::'s in a typename
+  typedef typename containertype::value_type _tmp_vt;
+  typedef typename _tmp_vt::value_type value_type;
+  typedef typename _tmp_vt::difference_type difference_type;
+  typedef typename _tmp_vt::reference reference;
+  typedef typename _tmp_vt::pointer pointer;
+
+  destructive_two_d_iterator(typename containertype::iterator begin, 
+                             typename containertype::iterator end,
+                             typename containertype::iterator curr)
+    : row_begin(begin), row_end(end), row_current(curr), col_current() {
+    if ( curr != end ) {
+      col_current = curr->TWOD_BEGIN_();
+      advance_past_end();                 // in case cur->begin() == cur->end()
+    }
+  }
+  destructive_two_d_iterator(typename containertype::iterator begin, 
+                             typename containertype::iterator end,
+                             typename containertype::iterator curr,
+                             typename containertype::value_type::TWOD_ITER_ col)
+    : row_begin(begin), row_end(end), row_current(curr), col_current(col) {
+    advance_past_end();                 // in case cur->begin() == cur->end()
+  }
+  destructive_two_d_iterator()
+    : row_begin(), row_end(), row_current(), col_current() {
+  }
+
+  typename containertype::iterator row_begin, row_end, row_current;
+  typename containertype::value_type::TWOD_ITER_ col_current;
+
+  // This is the part that destroys
+  void advance_past_end() {          // used when col_current points to end()
+    while ( col_current == row_current->TWOD_END_() ) {  // end of current row
+      row_current->clear();                         // the destructive part
+      // It would be nice if we could decrement sparsetable->num_buckets here
+      ++row_current;                                // go to beginning of next
+      if ( row_current != row_end )                 // col is irrelevant at end
+        col_current = row_current->TWOD_BEGIN_();         
+      else                                          
+        break;                                      // don't go past row_end
+    } 
+  } 
+
+  // EVERYTHING FROM HERE DOWN IS THE SAME AS THE REGULAR ITERATOR
+  reference operator*() const    { return *col_current; }
+  pointer operator->() const     { return &(operator*()); }
+
+  iterator& operator++() { 
+    assert(row_current != row_end);                 // how to ++ from there?
+    ++col_current;
+    advance_past_end();                 // in case col_current is at end()
+    return *this;
+  }
+  iterator operator++(int)       { iterator tmp(*this); ++*this; return tmp; }
+
+  bool operator==(const iterator& it) const {
+    return ( row_begin == it.row_begin &&
+             row_end == it.row_end &&
+             row_current == it.row_current &&
+             (row_current == row_end || col_current == it.col_current) );
+  }
+  bool operator!=(const iterator& it) const { return !(*this == it); }
+};
+
+#undef TWOD_BEGIN_
+#undef TWOD_END_
+#undef TWOD_ITER_
+#undef TWOD_CONST_ITER_
+
+
+
+
+
+// SPARSE-TABLE
+// ------------
+// The idea is that a table with (logically) t buckets is divided
+// into t/M *groups* of M buckets each.  (M is a constant set in
+// GROUP_SIZE for efficiency.)  Each group is stored sparsely.
+// Thus, inserting into the table causes some array to grow, which is
+// slow but still constant time.  Lookup involves doing a
+// logical-position-to-sparse-position lookup, which is also slow but
+// constant time.  The larger M is, the slower these operations are
+// but the less overhead (slightly).
+// 
+// To store the sparse array, we store a bitmap B, where B[i] = 1 iff
+// bucket i is non-empty.  Then to look up bucket i we really look up
+// array[# of 1s before i in B].  This is constant time for fixed M.
+// 
+// Terminology: the position of an item in the overall table (from
+// 1 .. t) is called its "location."  The logical position in a group
+// (from 1 .. M ) is called its "position."  The actual location in
+// the array (from 1 .. # of non-empty buckets in the group) is
+// called its "offset."
+
+// The weird mod in the offset is entirely to quiet compiler warnings
+#define PUT_(take_from, offset)                                              \
+  if ( putc(((take_from) >> ((offset) % (sizeof(take_from)*8))) % 256, fp)   \
+       == EOF )                                                              \
+    return false
+
+#define GET_(add_to, offset)                            \
+  if ((x=getc(fp)) == EOF)                              \
+    return false;                                       \
+  else                                                  \
+    add_to |= (static_cast<size_type>(x) << ((offset) % (sizeof(add_to)*8)))
+
+
+template <class T, uint16_t GROUP_SIZE>
+class sparsegroup {
+ public:
+  // Basic types
+  typedef T value_type;
+  typedef value_type* pointer;
+  typedef const value_type* const_pointer;
+  typedef table_iterator<sparsegroup<T, GROUP_SIZE> > iterator;
+  typedef const_table_iterator<sparsegroup<T, GROUP_SIZE> > const_iterator;
+  typedef table_element_adaptor<sparsegroup<T, GROUP_SIZE> > element_adaptor;
+  typedef value_type &reference;
+  typedef const value_type &const_reference;
+  typedef uint16_t size_type;                  // max # of buckets
+  typedef int16_t difference_type;
+  typedef STL_NAMESPACE::reverse_iterator<const_iterator> const_reverse_iterator;
+  typedef STL_NAMESPACE::reverse_iterator<iterator> reverse_iterator;
+
+  // These are our special iterators, that go over non-empty buckets in a
+  // group.  These aren't const-only because you can change non-empty bcks.
+  typedef pointer nonempty_iterator;
+  typedef const_pointer const_nonempty_iterator;
+  typedef STL_NAMESPACE::reverse_iterator<nonempty_iterator> reverse_nonempty_iterator;
+  typedef STL_NAMESPACE::reverse_iterator<const_nonempty_iterator> const_reverse_nonempty_iterator;
+
+  // Iterator functions
+  iterator begin()                      { return iterator(this, 0); }
+  const_iterator begin() const          { return const_iterator(this, 0); }
+  iterator end()                        { return iterator(this, size()); }
+  const_iterator end() const            { return const_iterator(this, size()); }
+  reverse_iterator rbegin()             { return reverse_iterator(end()); }
+  const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
+  reverse_iterator rend()               { return reverse_iterator(begin()); }
+  const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
+
+  // We'll have versions for our special non-empty iterator too
+  nonempty_iterator nonempty_begin()             { return group; }
+  const_nonempty_iterator nonempty_begin() const { return group; }
+  nonempty_iterator nonempty_end()               { return group + num_buckets; }
+  const_nonempty_iterator nonempty_end() const   { return group + num_buckets; }
+  reverse_nonempty_iterator nonempty_rbegin() {
+    return reverse_nonempty_iterator(nonempty_end());
+  }
+  const_reverse_nonempty_iterator nonempty_rbegin() const {
+    return const_reverse_nonempty_iterator(nonempty_end());
+  }
+  reverse_nonempty_iterator nonempty_rend() {
+    return reverse_nonempty_iterator(nonempty_begin());
+  }
+  const_reverse_nonempty_iterator nonempty_rend() const {
+    return const_reverse_nonempty_iterator(nonempty_begin());
+  }
+
+
+  // This gives us the "default" value to return for an empty bucket.
+  // We just use the default constructor on T, the template type
+  const_reference default_value() const {
+    static value_type defaultval = value_type();
+    return defaultval;
+  }
+
+
+ private:
+  // We need to do all this bit manipulation, of course.  ick
+  static size_type charbit(size_type i)  { return i >> 3; }
+  static size_type modbit(size_type i)   { return 1 << (i&7); }
+  bool bmtest(size_type i) const   { return bitmap[charbit(i)] & modbit(i); }
+  void bmset(size_type i)          { bitmap[charbit(i)] |= modbit(i); }
+  void bmclear(size_type i)        { bitmap[charbit(i)] &= ~modbit(i); }
+
+  // malloc / realloc that dies if allocation fails
+  void* realloc_or_die(void* ptr, size_t num_bytes) {
+    void* retval = realloc(ptr, num_bytes);
+    if (retval == NULL) {
+      fprintf(stderr, "FATAL ERROR: failed to allocate %d bytes for ptr %p",
+              num_bytes, ptr);
+      exit(1);
+    }
+    return retval;
+  }
+
+  void* malloc_or_die(size_t num_bytes) {
+    return realloc_or_die(NULL, num_bytes);
+  }
+
+ public:                         // get_iter() in sparsetable needs it
+  // We need a small function that tells us how many set bits there are
+  // in positions 0..i-1 of the bitmap.  It uses a big table.
+  // We make it static so templates don't allocate lots of these tables
+  static size_type pos_to_offset(const unsigned char *bm, size_type pos) {
+    // We could make these ints.  The tradeoff is size (eg does it overwhelm
+    // the cache?) vs efficiency in referencing sub-word-sized array elements
+    static const char bits_in[256] = {      // # of bits set in one char
+      0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
+      1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
+      1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
+      2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+      1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
+      2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+      2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+      3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+      1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
+      2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+      2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+      3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+      2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+      3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+      3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+      4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8,
+    };
+    size_type retval = 0;
+    
+    // [Note: condition pos > 8 is an optimization; convince yourself we
+    // give exactly the same result as if we had pos >= 8 here instead.]
+    for ( ; pos > 8; pos -= 8 )                    // bm[0..pos/8-1]
+      retval += bits_in[*bm++];                    // chars we want *all* bits in
+    return retval + bits_in[*bm & ((1 << pos)-1)]; // the char that includes pos
+  }
+
+  size_type pos_to_offset(size_type pos) const {   // not static but still const
+    return pos_to_offset(bitmap, pos);
+  }
+
+
+ public:
+  // Constructors -- default and copy -- and destructor
+  sparsegroup() : group(0), num_buckets(0) { memset(bitmap, 0, sizeof(bitmap)); }
+  sparsegroup(const sparsegroup& x) : group(0), num_buckets(x.num_buckets) {
+    if ( num_buckets ) {
+      group = (value_type *)malloc_or_die(x.num_buckets * sizeof(*group));
+      memcpy(group, x.group, x.num_buckets * sizeof(*group));
+    }
+    memcpy(bitmap, x.bitmap, sizeof(bitmap));
+  }
+  ~sparsegroup() { free(group); }       // free(NULL) does the right thing
+
+  // Operator= is just like the copy constructor, I guess
+  sparsegroup &operator=(const sparsegroup& x) {
+    if ( &x == this ) return *this;                    // x = x
+    if ( x.num_buckets == 0 ) {
+      free(group);
+      group = NULL;
+    } else {
+      group = (value_type *)
+              realloc_or_die(group, x.num_buckets * sizeof(*group));
+      memcpy(group, x.group, x.num_buckets * sizeof(*group));
+    }
+    memcpy(bitmap, x.bitmap, sizeof(bitmap));
+    num_buckets = x.num_buckets;
+    return *this;
+  }
+
+  // Many STL algorithms use swap instead of copy constructors
+  void swap(sparsegroup& x) {
+    STL_NAMESPACE::swap(group, x.group);
+    for ( int i = 0; i < sizeof(bitmap) / sizeof(*bitmap); ++i )
+      STL_NAMESPACE::swap(bitmap[i], x.bitmap[i]);  // swap not defined on arrays
+    STL_NAMESPACE::swap(num_buckets, x.num_buckets);
+  }
+
+  // It's always nice to be able to clear a table without deallocating it
+  void clear() {
+    if ( group )
+      free(group);
+    group = NULL;
+    memset(bitmap, 0, sizeof(bitmap));
+    num_buckets = 0;
+  }
+
+  // Functions that tell you about size.  Alas, these aren't so useful
+  // because our table is always fixed size.
+  size_type size() const           { return GROUP_SIZE; }
+  size_type max_size() const       { return GROUP_SIZE; }
+  bool empty() const               { return false; }
+  // We also may want to know how many *used* buckets there are
+  size_type num_nonempty() const   { return num_buckets; }
+
+
+  // get()/set() are explicitly const/non-const.  You can use [] if
+  // you want something that can be either (potentially more expensive).
+  const_reference get(size_type i) const {
+    if ( bmtest(i) )           // bucket i is occupied
+      return group[pos_to_offset(bitmap, i)];
+    else
+      return default_value();  // return the default reference
+  }
+
+  // TODO(csilvers): make protected + friend
+  reference mutating_get(size_type i) {    // fills bucket i before getting
+    if ( !bmtest(i) )
+      set(i, default_value());
+    return group[pos_to_offset(bitmap, i)];
+  }
+
+  // Syntactic sugar.  It's easy to return a const reference.  To
+  // return a non-const reference, we need to use the assigner adaptor.
+  const_reference operator[](size_type i) const {
+    return get(i);
+  }
+
+  element_adaptor operator[](size_type i) {
+    return element_adaptor(this, i);
+  }
+
+  // This returns a reference to the inserted item (which is a copy of val)
+  reference set(size_type i, const_reference val) {
+    size_type offset = pos_to_offset(bitmap, i);  // where we'll find (or insert)
+    if ( !bmtest(i) ) {                           // make space at group[offset]
+      // We know the realloc and memmove are safe because we ensure
+      // value_type is a Plain Old Data Type (see below)
+      group = (value_type *)
+              realloc_or_die(group, sizeof(*group) * ++num_buckets);
+      memmove(group + offset+1, group + offset, 
+              (num_buckets-1 - offset) * sizeof(*group));
+      bmset(i);
+    }
+    // This does the actual inserting.  Since we made the array using
+    // malloc, we use "placement new" to just call the constructor.
+    // We really should destruct this later, via group[offset].~value_type(),
+    // every time we free(), but we don't because it's a POD type.
+    new(&group[offset]) value_type(val);
+    return group[offset];
+  }
+
+  // We let you see if a bucket is non-empty without retrieving it
+  bool test(size_type i) const {
+    return bmtest(i);
+  }
+  bool test(iterator pos) const {
+    return bmtest(pos.pos);
+  }
+
+  // This takes the specified elements out of the group.  This is
+  // "undefining", rather than "clearing".
+  void erase(size_type i) {
+    if ( bmtest(i) ) {                           // trivial to erase empty bucket
+      size_type offset = pos_to_offset(bitmap,i); // where we'll find (or insert)
+      if ( --num_buckets == 0 ) {
+        free(group);
+        group = NULL;
+      } else {
+        memmove(group + offset, group + offset+1, 
+                (num_buckets - offset) * sizeof(*group));
+        group = (value_type *)
+                realloc_or_die(group, sizeof(*group) * num_buckets);
+      }
+      bmclear(i);
+    }
+    }
+
+  void erase(iterator pos) {
+    erase(pos.pos);
+  }
+
+  void erase(iterator start, iterator end) {
+    // This could be more efficient, but to do so we'd need to make
+    // bmclear() clear a range of indices.  Doesn't seem worth it.
+    for ( ; start != end; ++start )
+      erase(start);
+  }
+
+
+  // I/O
+  // We support reading and writing groups to disk.  We don't store
+  // the actual array contents (which we don't know how to store),
+  // just the bitmap and size.  Meant to be used with table I/O.
+  // Returns true if all was ok
+  bool write_metadata(FILE *fp) const {
+    assert(sizeof(num_buckets) == 2);     // we explicitly set to u_int16_t
+    PUT_(num_buckets, 8);
+    PUT_(num_buckets, 0);
+    if ( !fwrite(bitmap, sizeof(bitmap), 1, fp) )  return false;
+    return true;
+  }
+
+  // Reading destroys the old group contents!  Returns true if all was ok
+  bool read_metadata(FILE *fp) {
+    clear();
+    
+    int x;          // the GET_ macro requires an 'int x' to be defined
+    GET_(num_buckets, 8);
+    GET_(num_buckets, 0);
+
+    if ( !fread(bitmap, sizeof(bitmap), 1, fp) )  return false;
+
+    // We'll allocate the space; you'd better fill it somehow!
+    group = (value_type *)malloc(num_buckets * sizeof(*group));
+    if ( group == NULL )  return false;
+    return true;
+  }
+
+  // If your keys and values are simple enough, we can write them
+  // to disk for you.  "simple enough" means no pointers.
+  // However, we don't try to normalize endianness
+  bool write_nopointer_data(FILE *fp) const {
+    for ( const_nonempty_iterator it = nonempty_begin();
+          it != nonempty_end(); ++it ) {
+      if ( !fwrite(&*it, sizeof(*it), 1, fp) )  return false;
+    }
+    return true;
+  }
+
+  // When reading, we have to override the potential const-ness of *it
+  bool read_nopointer_data(FILE *fp) {
+    for ( nonempty_iterator it = nonempty_begin();
+          it != nonempty_end(); ++it ) {
+      if ( !fread(reinterpret_cast<void*>(&(*it)), sizeof(*it), 1, fp) )
+        return false;
+    }
+    return true;
+  }
+
+  // Comparisons.  Note the comparisons are pretty arbitrary: we
+  // compare values of the first index that isn't equal (using default
+  // value for empty buckets).
+  bool operator==(const sparsegroup& x) const {
+    return ( num_buckets == x.num_buckets &&
+             memcmp(bitmap, x.bitmap, sizeof(bitmap)) == 0 &&
+             STL_NAMESPACE::equal(begin(), end(), x.begin()) ); // from algorithm
+  }
+  bool operator<(const sparsegroup& x) const {      // also from algorithm
+    return STL_NAMESPACE::lexicographical_compare(begin(), end(), 
+                                                  x.begin(), x.end());
+  }
+  bool operator!=(const sparsegroup& x) const { return !(*this == x); }
+  bool operator<=(const sparsegroup& x) const { return *this < x || *this == x; }
+  bool operator>(const sparsegroup& x) const { return x <= *this; }
+  bool operator>=(const sparsegroup& x) const { return x < *this; }
+
+ private:
+  // We need to enforce that our value_type is a Plain Old Data Type
+  // (so we know realloc and memmove will work).  We use traits to
+  // enforce this.  The following gives a compile-time error if
+  // is_POD_type is false (which is the default for user types).
+  //
+  // IF YOU GET AN ERROR HERE, make sure your class is a POD type,
+  // and if so tell the compiler via code similar to this:
+  // template<> struct __type_traits<classname> {
+  //   typedef __true_type    has_trivial_default_constructor;
+  //   typedef __true_type    has_trivial_copy_constructor;
+  //   typedef __true_type    has_trivial_assignment_operator;
+  //   typedef __true_type    has_trivial_destructor;
+  //   typedef __true_type    is_POD_type;
+  // };
+  //
+  // If this is part of a hash_map, you need to make sure both the
+  // Key and Value types are POD types, if they're user-defined.
+#ifdef UNDERSTANDS_TYPE_TRAITS
+  static __true_type * const enforce_pod;
+#endif
+
+  // The actual data
+  value_type *group;                            // (small) array of T's
+  unsigned char bitmap[(GROUP_SIZE-1)/8 + 1];   // fancy math is so we round up
+  size_type num_buckets;                        // limits GROUP_SIZE to 64K
+};
+
+// We need a global swap as well
+template <class T, uint16_t GROUP_SIZE>
+inline void swap(sparsegroup<T,GROUP_SIZE> &x, sparsegroup<T,GROUP_SIZE> &y) {
+  x.swap(y);
+}
+
+#ifdef UNDERSTANDS_TYPE_TRAITS
+template <class T, uint16_t GROUP_SIZE>
+__true_type * const sparsegroup<T, GROUP_SIZE>::enforce_pod = 
+static_cast<typename __type_traits<value_type>::is_POD_type *>(0);
+#endif
+
+// ---------------------------------------------------------------------------
+
+
+template <class T, uint16_t GROUP_SIZE = DEFAULT_SPARSEGROUP_SIZE>
+class sparsetable {
+ public:
+  // Basic types
+  typedef T value_type;                        // stolen from stl_vector.h
+  typedef value_type* pointer;
+  typedef const value_type* const_pointer;
+  typedef table_iterator<sparsetable<T, GROUP_SIZE> > iterator;
+  typedef const_table_iterator<sparsetable<T, GROUP_SIZE> > const_iterator;
+  typedef table_element_adaptor<sparsetable<T, GROUP_SIZE> > element_adaptor;
+  typedef value_type &reference;
+  typedef const value_type &const_reference;
+  typedef size_t size_type;
+  typedef ptrdiff_t difference_type;
+  typedef STL_NAMESPACE::reverse_iterator<const_iterator> const_reverse_iterator;
+  typedef STL_NAMESPACE::reverse_iterator<iterator> reverse_iterator;
+
+  // These are our special iterators, that go over non-empty buckets in a
+  // table.  These aren't const only because you can change non-empty bcks.
+  typedef two_d_iterator< vector< sparsegroup<value_type, GROUP_SIZE> > >
+     nonempty_iterator;
+  typedef const_two_d_iterator< vector< sparsegroup<value_type, GROUP_SIZE> > >
+     const_nonempty_iterator;
+  typedef STL_NAMESPACE::reverse_iterator<nonempty_iterator> reverse_nonempty_iterator;
+  typedef STL_NAMESPACE::reverse_iterator<const_nonempty_iterator> const_reverse_nonempty_iterator;
+  // Another special iterator: it frees memory as it iterates (used to resize)
+  typedef destructive_two_d_iterator< vector< sparsegroup<value_type, GROUP_SIZE> > >
+     destructive_iterator;
+
+  // Iterator functions
+  iterator begin()                      { return iterator(this, 0); }
+  const_iterator begin() const          { return const_iterator(this, 0); }
+  iterator end()                        { return iterator(this, size()); }
+  const_iterator end() const            { return const_iterator(this, size()); }
+  reverse_iterator rbegin()             { return reverse_iterator(end()); }
+  const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
+  reverse_iterator rend()               { return reverse_iterator(begin()); }
+  const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
+
+  // Versions for our special non-empty iterator
+  nonempty_iterator nonempty_begin()             {
+    return nonempty_iterator(groups.begin(), groups.end(), groups.begin());
+  }
+  const_nonempty_iterator nonempty_begin() const {
+    return const_nonempty_iterator(groups.begin(),groups.end(), groups.begin());
+  }
+  nonempty_iterator nonempty_end() {
+    return nonempty_iterator(groups.begin(), groups.end(), groups.end());
+  }
+  const_nonempty_iterator nonempty_end() const {
+    return const_nonempty_iterator(groups.begin(), groups.end(), groups.end());
+  }
+  reverse_nonempty_iterator nonempty_rbegin() {
+    return reverse_nonempty_iterator(nonempty_end());
+  }
+  const_reverse_nonempty_iterator nonempty_rbegin() const {
+    return const_reverse_nonempty_iterator(nonempty_end());
+  }
+  reverse_nonempty_iterator nonempty_rend() {
+    return reverse_nonempty_iterator(nonempty_begin());
+  }
+  const_reverse_nonempty_iterator nonempty_rend() const {
+    return const_reverse_nonempty_iterator(nonempty_begin());
+  }
+  destructive_iterator destructive_begin() {
+    return destructive_iterator(groups.begin(), groups.end(), groups.begin());
+  }
+  destructive_iterator destructive_end() {
+    return destructive_iterator(groups.begin(), groups.end(), groups.end());
+  }
+
+ private:
+  typedef typename vector< sparsegroup<value_type, GROUP_SIZE> >::reference
+    GroupsReference;
+  typedef typename 
+    vector< sparsegroup<value_type, GROUP_SIZE> >::const_reference 
+    GroupsConstReference;
+  typedef typename vector< sparsegroup<value_type, GROUP_SIZE> >::iterator
+    GroupsIterator;
+  typedef typename vector< sparsegroup<value_type, GROUP_SIZE> >::const_iterator
+    GroupsConstIterator;
+
+  // How to deal with the proper group
+  static size_type num_groups(size_type num) {   // how many to hold num buckets
+    return num == 0 ? 0 : ((num-1) / GROUP_SIZE) + 1;
+  }
+
+  size_type pos_in_group(size_type i) const { return i % GROUP_SIZE; }
+  size_type group_num(size_type i) const    { return i / GROUP_SIZE; }
+  GroupsReference which_group(size_type i)  { return groups[group_num(i)]; }
+  GroupsConstReference which_group(size_type i) const 
+                                            { return groups[group_num(i)]; }
+
+
+ public:
+  // Constructors -- default, normal (when you specify size), and copy
+  sparsetable(size_type size = 0) 
+    : groups(num_groups(size)), table_size(size), num_buckets(0) { }
+  // We'll can get away with using the default copy constructor,
+  // and default destructor, and hence the default operator=.  Huzzah!
+
+  // Many STL algorithms use swap instead of copy constructors
+  void swap(sparsetable& x) {
+    STL_NAMESPACE::swap(groups, x.groups);
+    STL_NAMESPACE::swap(table_size, x.table_size);
+    STL_NAMESPACE::swap(num_buckets, x.num_buckets);
+  }
+
+  // It's always nice to be able to clear a table without deallocating it
+  void clear() {
+    GroupsIterator group;
+    for ( group = groups.begin(); group != groups.end(); ++group ) {
+      group->clear();
+    }
+    num_buckets = 0;
+  }
+
+  // Functions that tell you about size.
+  // NOTE: empty() is non-intuitive!  It does not tell you the number
+  // of not-empty buckets (use num_nonempty() for that).  Instead
+  // it says whether you've allocated any buckets or not.
+  size_type size() const           { return table_size; }
+  size_type max_size() const       { return size_type(-1); }
+  bool empty() const               { return table_size == 0; }
+  // We also may want to know how many *used* buckets there are
+  size_type num_nonempty() const   { return num_buckets; }
+
+  // OK, we'll let you resize one of these puppies
+  void resize(size_type new_size) {
+    groups.resize(num_groups(new_size));
+    if ( new_size < table_size) {   // lower num_buckets, clear last group
+      if ( new_size % GROUP_SIZE > 0 )       // need to clear from last group
+        groups.back().erase(groups.back().begin() + (new_size % GROUP_SIZE),
+                            groups.back().end());
+      num_buckets = 0;                       // refigure # of used buckets
+      GroupsConstIterator group;
+      for ( group = groups.begin(); group != groups.end(); ++group )
+        num_buckets += group->num_nonempty();
+    }
+    table_size = new_size;
+  }
+
+
+  // We let you see if a bucket is non-empty without retrieving it
+  bool test(size_type i) const {
+    return which_group(i).test(pos_in_group(i));
+  }
+  bool test(iterator pos) const {
+    return which_group(pos.pos).test(pos_in_group(pos.pos));
+  }
+  bool test(const_iterator pos) const {
+    return which_group(pos.pos).test(pos_in_group(pos.pos));
+  }
+
+  // We only return const_references because it's really hard to 
+  // return something settable for empty buckets.  Use set() instead.
+  const_reference get(size_type i) const {
+    assert(i < table_size);
+    return which_group(i).get(pos_in_group(i));
+  }
+
+  // TODO(csilvers): make protected + friend element_adaptor
+  reference mutating_get(size_type i) {    // fills bucket i before getting
+    assert(i < table_size);
+    size_type old_numbuckets = which_group(i).num_nonempty();
+    reference retval = which_group(i).mutating_get(pos_in_group(i));
+    num_buckets += which_group(i).num_nonempty() - old_numbuckets;
+    return retval;
+  }
+
+  // Syntactic sugar.  As in sparsegroup, the non-const version is harder
+  const_reference operator[](size_type i) const {
+    return get(i);
+  }
+
+  element_adaptor operator[](size_type i) {
+    return element_adaptor(this, i);
+  }
+
+  // Needed for hashtables, gets as a nonempty_iterator.  Crashes for empty bcks
+  const_nonempty_iterator get_iter(size_type i) const {
+    assert(test(i));    // how can a nonempty_iterator point to an empty bucket?
+    return const_nonempty_iterator(
+      groups.begin(), groups.end(), 
+      groups.begin() + group_num(i),
+      (groups[group_num(i)].nonempty_begin() + 
+       groups[group_num(i)].pos_to_offset(pos_in_group(i))));
+  }
+  // For nonempty we can return a non-const version
+  nonempty_iterator get_iter(size_type i) {
+    assert(test(i));    // how can a nonempty_iterator point to an empty bucket?
+    return nonempty_iterator(
+      groups.begin(), groups.end(), 
+      groups.begin() + group_num(i),
+      (groups[group_num(i)].nonempty_begin() +
+       groups[group_num(i)].pos_to_offset(pos_in_group(i))));
+  }
+
+
+  // This returns a reference to the inserted item (which is a copy of val)
+  // The trick is to figure out whether we're replacing or inserting anew
+  reference set(size_type i, const_reference val) {
+    assert(i < table_size);
+    size_type old_numbuckets = which_group(i).num_nonempty();
+    reference retval = which_group(i).set(pos_in_group(i), val);
+    num_buckets += which_group(i).num_nonempty() - old_numbuckets;
+    return retval;
+  }
+
+  // This takes the specified elements out of the table.  This is
+  // "undefining", rather than "clearing".
+  void erase(size_type i) {
+    assert(i < table_size);
+    size_type old_numbuckets = which_group(i).num_nonempty();
+    which_group(i).erase(pos_in_group(i));
+    num_buckets += which_group(i).num_nonempty() - old_numbuckets;
+  }
+
+  void erase(iterator pos) {
+    erase(pos.pos);
+  }
+
+  void erase(iterator start, iterator end) {
+    // This could be more efficient, but then we'd need to figure
+    // out if we spanned groups or not.  Doesn't seem worth it.
+    for ( ; start != end; ++start )
+      erase(start);
+  }
+  
+
+  // We support reading and writing tables to disk.  We don't store
+  // the actual array contents (which we don't know how to store),
+  // just the groups and sizes.  Returns true if all went ok.
+
+ private:
+  // Every time the disk format changes, this should probably change too
+  static const unsigned long MAGIC_NUMBER = 0x24687531;
+
+  // Old versions of this code write all data in 32 bits.  We need to
+  // support these files as well as having support for 64-bit systems.
+  // So we use the following encoding scheme: for values < 2^32-1, we
+  // store in 4 bytes in big-endian order.  For values > 2^32, we
+  // store 0xFFFFFFF followed by 8 bytes in big-endian order.  This
+  // causes us to mis-read old-version code that stores exactly
+  // 0xFFFFFFF, but I don't think that is likely to have happened for
+  // these particular values.
+  static bool write_32_or_64(FILE* fp, size_type value) {
+    if ( value < 0xFFFFFFFFULL ) {        // fits in 4 bytes
+      PUT_(value, 24);
+      PUT_(value, 16);
+      PUT_(value, 8);
+      PUT_(value, 0);
+    } else if ( value == 0xFFFFFFFFUL ) {   // special case in 32bit systems
+      PUT_(0xFF, 0); PUT_(0xFF, 0); PUT_(0xFF, 0); PUT_(0xFF, 0);  // marker
+      PUT_(0, 0); PUT_(0, 0); PUT_(0, 0); PUT_(0, 0);
+      PUT_(0xFF, 0); PUT_(0xFF, 0); PUT_(0xFF, 0); PUT_(0xFF, 0);
+    } else {
+      PUT_(0xFF, 0); PUT_(0xFF, 0); PUT_(0xFF, 0); PUT_(0xFF, 0);  // marker
+      PUT_(value, 56);
+      PUT_(value, 48);
+      PUT_(value, 40);
+      PUT_(value, 32);
+      PUT_(value, 24);
+      PUT_(value, 16);
+      PUT_(value, 8);
+      PUT_(value, 0);
+    }
+    return true;
+  }
+
+  static bool read_32_or_64(FILE* fp, size_type *value) {  // reads into value
+    size_type first4 = 0;
+    int x;
+    GET_(first4, 24);
+    GET_(first4, 16);
+    GET_(first4, 8);
+    GET_(first4, 0);
+    if ( first4 < 0xFFFFFFFFULL ) {
+      *value = first4;
+    } else {
+      GET_(*value, 56);
+      GET_(*value, 48);
+      GET_(*value, 40);
+      GET_(*value, 32);
+      GET_(*value, 24);
+      GET_(*value, 16);
+      GET_(*value, 8);
+      GET_(*value, 0);
+    }
+    return true;
+  }
+
+ public:
+  bool write_metadata(FILE *fp) const {
+    if ( !write_32_or_64(fp, MAGIC_NUMBER) )  return false;
+    if ( !write_32_or_64(fp, table_size) )  return false;
+    if ( !write_32_or_64(fp, num_buckets) )  return false;
+
+    GroupsConstIterator group;
+    for ( group = groups.begin(); group != groups.end(); ++group )
+      if ( group->write_metadata(fp) == false )  return false;
+    return true;
+  }
+
+  // Reading destroys the old table contents!  Returns true if read ok.
+  bool read_metadata(FILE *fp) {
+    size_type magic_read = 0;
+    if ( !read_32_or_64(fp, &magic_read) )  return false;
+    if ( magic_read != MAGIC_NUMBER ) {
+      clear();                        // just to be consistent
+      return false;
+    }
+
+    if ( !read_32_or_64(fp, &table_size) )  return false;
+    if ( !read_32_or_64(fp, &num_buckets) )  return false;
+
+    resize(table_size);                            // so the vector's sized ok
+    GroupsIterator group;
+    for ( group = groups.begin(); group != groups.end(); ++group )
+      if ( group->read_metadata(fp) == false )  return false;
+    return true;
+  }
+
+  // This code is identical to that for SparseGroup
+  // If your keys and values are simple enough, we can write them
+  // to disk for you.  "simple enough" means no pointers.
+  // However, we don't try to normalize endianness
+  bool write_nopointer_data(FILE *fp) const {
+    for ( const_nonempty_iterator it = nonempty_begin();
+          it != nonempty_end(); ++it ) {
+      if ( !fwrite(&*it, sizeof(*it), 1, fp) )  return false;
+    }
+    return true;
+  }
+
+  // When reading, we have to override the potential const-ness of *it
+  bool read_nopointer_data(FILE *fp) {
+    for ( nonempty_iterator it = nonempty_begin();
+          it != nonempty_end(); ++it ) {
+      if ( !fread(reinterpret_cast<void*>(&(*it)), sizeof(*it), 1, fp) )
+        return false;
+    }
+    return true;
+  }
+
+  // Comparisons.  Note the comparisons are pretty arbitrary: we
+  // compare values of the first index that isn't equal (using default
+  // value for empty buckets).
+  bool operator==(const sparsetable& x) const {
+    return ( table_size == x.table_size &&
+             num_buckets == x.num_buckets &&
+             groups == x.groups );
+  }
+  bool operator<(const sparsetable& x) const {      // also from algobase.h
+    return STL_NAMESPACE::lexicographical_compare(begin(), end(), 
+                                                  x.begin(), x.end());
+  }
+  bool operator!=(const sparsetable& x) const { return !(*this == x); }
+  bool operator<=(const sparsetable& x) const { return *this < x || *this == x; }
+  bool operator>(const sparsetable& x) const { return x <= *this; }
+  bool operator>=(const sparsetable& x) const { return x < *this; }
+
+
+ private:
+  // The actual data
+  vector< sparsegroup<value_type, GROUP_SIZE> > groups;  // our list of groups
+  size_type table_size;                         // how many buckets they want
+  size_type num_buckets;                        // number of non-empty buckets
+};
+
+// We need a global swap as well
+template <class T, uint16_t GROUP_SIZE>
+inline void swap(sparsetable<T,GROUP_SIZE> &x, sparsetable<T,GROUP_SIZE> &y) {
+  x.swap(y);
+}
+
+#undef GET_
+#undef PUT_
+
+_END_GOOGLE_NAMESPACE_
+
+#endif
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparse_hash_set
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparse_hash_set	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparse_hash_set	(revision 2162)
@@ -0,0 +1,223 @@
+// Copyright (c) 2005, Google Inc.
+// All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+// 
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+// 
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// ---
+// Author: Craig Silverstein
+//
+// This is just a very thin wrapper over sparsehashtable.h, just
+// like sgi stl's stl_hash_set is a very thin wrapper over
+// stl_hashtable.  The major thing we define is operator[], because
+// we have a concept of a data_type which stl_hashtable doesn't
+// (it only has a key and a value).
+//
+// This is more different from sparse_hash_map than you might think,
+// because all iterators for sets are const (you obviously can't
+// change the key, and for sets there is no value).
+//
+// We adhere mostly to the STL semantics for hash-set.  One important
+// exception is that insert() invalidates iterators entirely.  On the
+// plus side, though, delete() doesn't invalidate iterators at all, or
+// even change the ordering of elements.
+//
+// Here are a few "power user" tips:
+//
+//    1) set_deleted_key():
+//         Unlike STL's hash_map, if you want to use erase() you
+//         must call set_deleted_key() after construction.
+//
+//    2) resize(0):
+//         When an item is deleted, its memory isn't freed right
+//         away.  This allows you to iterate over a hashtable,
+//         and call erase(), without invalidating the iterator.
+//         To force the memory to be freed, call resize(0).
+//
+// Guide to what kind of hash_set to use:
+//   (1) dense_hash_set: fastest, uses the most memory
+//   (2) sparse_hash_set: slowest, uses the least memory
+//   (3) hash_set (STL): in the middle
+// Typically I use sparse_hash_set when I care about space and/or when
+// I need to save the hashtable on disk.  I use hash_set otherwise.  I
+// don't personally use dense_hash_set ever; the only use of
+// dense_hash_set I know of is to work around malloc() bugs in some
+// systems (dense_hash_set has a particularly simple allocation scheme).
+//
+// - dense_hash_set has, typically, a factor of 2 memory overhead (if your
+//   data takes up X bytes, the hash_set uses X more bytes in overhead).
+// - sparse_hash_set has about 2 bits overhead per entry.
+// - sparse_hash_map can be 3-7 times slower than the others for lookup and,
+//   especially, inserts.  See time_hash_map.cc for details.
+//
+// See /usr/(local/)?doc/sparsehash-0.1/sparse_hash_set.html
+// for information about how to use this class.
+
+#ifndef _SPARSE_HASH_SET_H_
+#define _SPARSE_HASH_SET_H_
+
+#include <google/sparsehash/config.h>
+#include <stdio.h>                    // for FILE * in read()/write()
+#include <algorithm>                  // for the default template args
+#include <functional>                // for equal_to
+#include <memory>                    // for alloc<>
+#include <google/sparsehash/hash_fun.h>
+#include <google/sparsehash/sparsehashtable.h>
+
+_START_GOOGLE_NAMESPACE_
+
+using STL_NAMESPACE::pair;
+
+template <class Value,
+          class HashFcn = HASH_NAMESPACE::hash<Value>,
+          class EqualKey = STL_NAMESPACE::equal_to<Value>,
+          class Alloc = STL_NAMESPACE::allocator<Value> >
+class sparse_hash_set {
+
+ private:
+  // Apparently identity is not stl-standard, so we define our own
+  struct Identity {
+    Value& operator()(Value& v) const { return v; }
+    const Value& operator()(const Value& v) const { return v; }
+  };
+
+  // The actual data
+  typedef sparse_hashtable<Value, Value, HashFcn, Identity, EqualKey, Alloc> ht;
+  ht rep;
+
+ public:
+  typedef typename ht::key_type key_type;
+  typedef typename ht::value_type value_type;
+  typedef typename ht::hasher hasher;
+  typedef typename ht::key_equal key_equal;
+
+  typedef typename ht::size_type size_type;
+  typedef typename ht::difference_type difference_type;
+  typedef typename ht::const_pointer pointer;
+  typedef typename ht::const_pointer const_pointer;
+  typedef typename ht::const_reference reference;
+  typedef typename ht::const_reference const_reference;
+
+  typedef typename ht::const_iterator iterator;
+  typedef typename ht::const_iterator const_iterator;
+
+
+  // Iterator functions -- recall all iterators are const
+  iterator begin() const              { return rep.begin(); }
+  iterator end() const                { return rep.end(); }
+
+
+  // Accessor functions
+  hasher hash_funct() const { return rep.hash_funct(); }
+  key_equal key_eq() const  { return rep.key_eq(); }
+
+
+  // Constructors
+  explicit sparse_hash_set(size_type n = 0,
+                           const hasher& hf = hasher(),
+                           const key_equal& eql = key_equal())
+    : rep(n, hf, eql) { }
+
+  template <class InputIterator>
+  sparse_hash_set(InputIterator f, InputIterator l,
+                  size_type n = 0,
+                  const hasher& hf = hasher(),
+                  const key_equal& eql = key_equal()) {
+    rep.insert(f, l);
+  }
+  // We use the default copy constructor
+  // We use the default operator=()
+  // We use the default destructor
+
+  void clear()                        { rep.clear(); }
+  void swap(sparse_hash_set& hs)      { rep.swap(hs.rep); }
+
+
+  // Functions concerning size
+  size_type size() const              { return rep.size(); }
+  size_type max_size() const          { return rep.max_size(); }
+  bool empty() const                  { return rep.empty(); }
+  size_type bucket_count() const      { return rep.bucket_count(); }
+  size_type max_bucket_count() const  { return rep.max_bucket_count(); }
+
+  void resize(size_type hint)         { rep.resize(hint); }
+
+
+  // Lookup routines
+  iterator find(const key_type& key) const           { return rep.find(key); }
+
+  size_type count(const key_type& key) const         { return rep.count(key); }
+
+  pair<iterator, iterator> equal_range(const key_type& key) const {
+    return rep.equal_range(key);
+  }
+
+  // Insertion routines
+  pair<iterator, bool> insert(const value_type& obj) {
+    pair<typename ht::iterator, bool> p = rep.insert(obj);
+    return pair<iterator, bool>(p.first, p.second);   // const to non-const
+  }
+  template <class InputIterator>
+  void insert(InputIterator f, InputIterator l)      { rep.insert(f, l); }
+  void insert(const_iterator f, const_iterator l)    { rep.insert(f, l); }
+  // required for std::insert_iterator; the passed-in iterator is ignored
+  iterator insert(iterator, const value_type& obj)   { return insert(obj).first; }
+
+
+  // Deletion routines
+  // THESE ARE NON-STANDARD!  I make you specify an "impossible" key
+  // value to identify deleted buckets.  You can change the key as
+  // time goes on, or get rid of it entirely to be insert-only.
+  void set_deleted_key(const key_type& key)   { rep.set_deleted_key(key); }
+  void clear_deleted_key()                    { rep.clear_deleted_key(); }
+
+  // These are standard
+  size_type erase(const key_type& key)               { return rep.erase(key); }
+  void erase(iterator it)                            { rep.erase(it); }
+  void erase(iterator f, iterator l)                 { rep.erase(f, l); }
+
+
+  // Comparison
+  bool operator==(const sparse_hash_set& hs) const   { return rep == hs.rep; }
+  bool operator!=(const sparse_hash_set& hs) const   { return rep != hs.rep; }
+
+
+  // I/O -- this is an add-on for writing metainformation to disk
+  bool write_metadata(FILE *fp)       { return rep.write_metadata(fp); }
+  bool read_metadata(FILE *fp)        { return rep.read_metadata(fp); }
+  bool write_nopointer_data(FILE *fp) { return rep.write_nopointer_data(fp); }
+  bool read_nopointer_data(FILE *fp)  { return rep.read_nopointer_data(fp); }
+};
+
+template <class Val, class HashFcn, class EqualKey, class Alloc>
+inline void swap(sparse_hash_set<Val, HashFcn, EqualKey, Alloc>& hs1,
+                 sparse_hash_set<Val, HashFcn, EqualKey, Alloc>& hs2) {
+  hs1.swap(hs2);
+}
+
+_END_GOOGLE_NAMESPACE_
+
+#endif /* _SPARSE_HASH_SET_H_ */
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/dense_hash_set
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/dense_hash_set	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/dense_hash_set	(revision 2162)
@@ -0,0 +1,233 @@
+// Copyright (c) 2005, Google Inc.
+// All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+// 
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+// 
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// ---
+// Author: Craig Silverstein
+//
+// This is just a very thin wrapper over densehashtable.h, just
+// like sgi stl's stl_hash_set is a very thin wrapper over 
+// stl_hashtable.  The major thing we define is operator[], because
+// we have a concept of a data_type which stl_hashtable doesn't
+// (it only has a key and a value).
+//
+// This is more different from dense_hash_map than you might think,
+// because all iterators for sets are const (you obviously can't
+// change the key, and for sets there is no value).
+//
+// NOTE: this is exactly like sparse_hash_set.h, with the word
+// "sparse" replaced by "dense", except for the addition of
+// set_empty_key().
+//
+//   YOU MUST CALL SET_EMPTY_KEY() IMMEDIATELY AFTER CONSTRUCTION.
+//
+// Otherwise your program will die in mysterious ways.
+//
+// In other respects, we adhere mostly to the STL semantics for
+// hash-set.  One important exception is that insert() invalidates
+// iterators entirely.  On the plus side, though, erase() doesn't
+// invalidate iterators at all, or even change the ordering of elements.
+//
+// Here are a few "power user" tips:
+//
+//    1) set_deleted_key():
+//         If you want to use erase() you must call set_deleted_key(),
+//         in addition to set_empty_key(), after construction.
+//
+//    2) resize(0):
+//         When an item is deleted, its memory isn't freed right
+//         away.  This allows you to iterate over a hashtable,
+//         and call erase(), without invalidating the iterator.
+//         To force the memory to be freed, call resize(0).
+//
+// Guide to what kind of hash_set to use:
+//   (1) dense_hash_set: fastest, uses the most memory
+//   (2) sparse_hash_set: slowest, uses the least memory
+//   (3) hash_set (STL): in the middle
+// Typically I use sparse_hash_set when I care about space and/or when
+// I need to save the hashtable on disk.  I use hash_set otherwise.  I
+// don't personally use dense_hash_set ever; the only use of
+// dense_hash_set I know of is to work around malloc() bugs in some
+// systems (dense_hash_set has a particularly simple allocation scheme).
+//
+// - dense_hash_set has, typically, a factor of 2 memory overhead (if your
+//   data takes up X bytes, the hash_set uses X more bytes in overhead).
+// - sparse_hash_set has about 2 bits overhead per entry.
+// - sparse_hash_map can be 3-7 times slower than the others for lookup and,
+//   especially, inserts.  See time_hash_map.cc for details.
+//
+// See /usr/(local/)?doc/sparsehash-0.1/dense_hash_set.html
+// for information about how to use this class.
+
+#ifndef _DENSE_HASH_SET_H_
+#define _DENSE_HASH_SET_H_
+
+#include <google/sparsehash/config.h>
+#include <stdio.h>                   // for FILE * in read()/write()
+#include <algorithm>                 // for the default template args
+#include <functional>                // for equal_to
+#include <memory>                    // for alloc<>
+#include <google/sparsehash/hash_fun.h>
+#include <google/sparsehash/densehashtable.h>
+
+
+_START_GOOGLE_NAMESPACE_
+
+using STL_NAMESPACE::pair;
+
+template <class Value,
+          class HashFcn = HASH_NAMESPACE::hash<Value>,
+          class EqualKey = STL_NAMESPACE::equal_to<Value>, 
+          class Alloc = STL_NAMESPACE::allocator<Value> >
+class dense_hash_set {
+ private:
+
+  // Apparently identity is not stl-standard, so we define our own
+  struct Identity {
+    Value& operator()(Value& v) const { return v; }
+    const Value& operator()(const Value& v) const { return v; }
+  };
+
+  // The actual data
+  typedef dense_hashtable<Value, Value, HashFcn, Identity, EqualKey, Alloc> ht;
+  ht rep;
+
+ public:
+  typedef typename ht::key_type key_type;
+  typedef typename ht::value_type value_type;
+  typedef typename ht::hasher hasher;
+  typedef typename ht::key_equal key_equal;
+
+  typedef typename ht::size_type size_type;
+  typedef typename ht::difference_type difference_type;
+  typedef typename ht::const_pointer pointer;
+  typedef typename ht::const_pointer const_pointer;
+  typedef typename ht::const_reference reference;
+  typedef typename ht::const_reference const_reference;
+
+  typedef typename ht::const_iterator iterator;
+  typedef typename ht::const_iterator const_iterator;
+
+
+  // Iterator functions -- recall all iterators are const
+  iterator begin() const              { return rep.begin(); }
+  iterator end() const                { return rep.end(); }
+
+
+  // Accessor functions
+  hasher hash_funct() const { return rep.hash_funct(); }
+  key_equal key_eq() const  { return rep.key_eq(); }
+
+
+  // Constructors
+  explicit dense_hash_set(size_type n = 0,
+                          const hasher& hf = hasher(),
+                          const key_equal& eql = key_equal())
+    : rep(n, hf, eql) { }
+  
+  template <class InputIterator>
+  dense_hash_set(InputIterator f, InputIterator l,
+                 size_type n = 0,
+                 const hasher& hf = hasher(),
+                 const key_equal& eql = key_equal()) {
+    rep.insert(f, l);
+  }
+  // We use the default copy constructor
+  // We use the default operator=()
+  // We use the default destructor
+
+  void clear()                        { rep.clear(); }
+  void swap(dense_hash_set& hs)       { rep.swap(hs.rep); }
+
+
+  // Functions concerning size
+  size_type size() const              { return rep.size(); }
+  size_type max_size() const          { return rep.max_size(); }
+  bool empty() const                  { return rep.empty(); }
+  size_type bucket_count() const      { return rep.bucket_count(); }
+  size_type max_bucket_count() const  { return rep.max_bucket_count(); }
+
+  void resize(size_type hint)         { rep.resize(hint); }
+
+
+  // Lookup routines
+  iterator find(const key_type& key) const           { return rep.find(key); }
+
+  size_type count(const key_type& key) const         { return rep.count(key); }
+  
+  pair<iterator, iterator> equal_range(const key_type& key) const {
+    return rep.equal_range(key);
+  }
+
+  // Insertion routines
+  pair<iterator, bool> insert(const value_type& obj) {
+    pair<typename ht::iterator, bool> p = rep.insert(obj);
+    return pair<iterator, bool>(p.first, p.second);   // const to non-const
+  }
+  template <class InputIterator>
+  void insert(InputIterator f, InputIterator l)      { rep.insert(f, l); }
+  void insert(const_iterator f, const_iterator l)    { rep.insert(f, l); }
+  // required for std::insert_iterator; the passed-in iterator is ignored
+  iterator insert(iterator, const value_type& obj)   { return insert(obj).first; }
+
+
+  // Deletion and empty routines
+  // THESE ARE NON-STANDARD!  I make you specify an "impossible" key
+  // value to identify deleted and empty buckets.  You can change the
+  // deleted key as time goes on, or get rid of it entirely to be insert-only.
+  void set_empty_key(const key_type& key)     { rep.set_empty_key(key); }
+  void set_deleted_key(const key_type& key)   { rep.set_deleted_key(key); }
+  void clear_deleted_key()                    { rep.clear_deleted_key(); }
+
+  // These are standard
+  size_type erase(const key_type& key)               { return rep.erase(key); }
+  void erase(iterator it)                            { rep.erase(it); }
+  void erase(iterator f, iterator l)                 { rep.erase(f, l); }
+
+
+  // Comparison
+  bool operator==(const dense_hash_set& hs) const    { return rep == hs.rep; }
+  bool operator!=(const dense_hash_set& hs) const    { return rep != hs.rep; }
+
+
+  // I/O -- this is an add-on for writing metainformation to disk
+  bool write_metadata(FILE *fp)       { return rep.write_metadata(fp); }
+  bool read_metadata(FILE *fp)        { return rep.read_metadata(fp); }
+  bool write_nopointer_data(FILE *fp) { return rep.write_nopointer_data(fp); }
+  bool read_nopointer_data(FILE *fp)  { return rep.read_nopointer_data(fp); }
+};
+
+template <class Val, class HashFcn, class EqualKey, class Alloc>
+inline void swap(dense_hash_set<Val, HashFcn, EqualKey, Alloc>& hs1,
+                 dense_hash_set<Val, HashFcn, EqualKey, Alloc>& hs2) {
+  hs1.swap(hs2);
+}
+
+_END_GOOGLE_NAMESPACE_
+
+#endif /* _DENSE_HASH_SET_H_ */
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparse_hash_map
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparse_hash_map	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/sparse_hash_map	(revision 2162)
@@ -0,0 +1,275 @@
+// Copyright (c) 2005, Google Inc.
+// All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+// 
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+// 
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// ---
+// Author: Craig Silverstein
+//
+// This is just a very thin wrapper over sparsehashtable.h, just
+// like sgi stl's stl_hash_map is a very thin wrapper over 
+// stl_hashtable.  The major thing we define is operator[], because
+// we have a concept of a data_type which stl_hashtable doesn't
+// (it only has a key and a value).
+//
+// We adhere mostly to the STL semantics for hash-map.  One important
+// exception is that insert() invalidates iterators entirely.  On the
+// plus side, though, delete() doesn't invalidate iterators at all, or
+// even change the ordering of elements.
+//
+// Here are a few "power user" tips:
+//
+//    1) set_deleted_key():
+//         Unlike STL's hash_map, if you want to use erase() you
+//         must call set_deleted_key() after construction.
+//
+//    2) resize(0):
+//         When an item is deleted, its memory isn't freed right
+//         away.  This is what allows you to iterate over a hashtable
+//         and call erase() without invalidating the iterator.
+//         To force the memory to be freed, call resize(0).
+//
+// Guide to what kind of hash_map to use:
+//   (1) dense_hash_map: fastest, uses the most memory
+//   (2) sparse_hash_map: slowest, uses the least memory
+//   (3) hash_map (STL): in the middle
+// Typically I use sparse_hash_map when I care about space and/or when
+// I need to save the hashtable on disk.  I use hash_map otherwise.  I
+// don't personally use dense_hash_map ever; the only use of
+// dense_hash_map I know of is to work around malloc() bugs in some
+// systems (dense_hash_map has a particularly simple allocation scheme).
+//
+// - dense_hash_map has, typically, a factor of 2 memory overhead (if your
+//   data takes up X bytes, the hash_map uses X more bytes in overhead).
+// - sparse_hash_map has about 2 bits overhead per entry.
+// - sparse_hash_map can be 3-7 times slower than the others for lookup and,
+//   especially, inserts.  See time_hash_map.cc for details.
+//
+// See /usr/(local/)?doc/sparsehash-0.1/sparse_hash_map.html
+// for information about how to use this class.
+
+#ifndef _SPARSE_HASH_MAP_H_
+#define _SPARSE_HASH_MAP_H_
+
+#include <google/sparsehash/config.h>
+#include <stdio.h>                   // for FILE * in read()/write()
+#include <algorithm>                 // for the default template args
+#include <functional>                // for equal_to
+#include <memory>                    // for alloc<>
+#include <google/sparsehash/hash_fun.h>
+#include <google/sparsehash/sparsehashtable.h>
+
+
+// Lots of STLs don't support type traits, so we might well do without.
+// We also have a guard to make sure we don't include this code twice:
+// once for sparse_hash_map and once for dense_hash_map.
+#if defined(UNDERSTANDS_TYPE_TRAITS) && !defined(_ANDED_TRAITS_)
+#define _ANDED_TRAITS_
+
+#if defined HAVE_TYPE_TRAITS
+#include <type_traits.h>
+#elif defined HAVE_BITS_TYPE_TRAITS
+#include <bits/type_traits.h>
+#endif
+
+// We need to let the densetable know that our pair<Key,Data> is
+// a Plain Old Data type if both the Key and Data are.
+template <class Key, class T>       
+struct __and_trait {                             // by default x & y == false
+  typedef __false_type tp;
+};
+
+template <> struct __and_trait<__true_type, __true_type> {   // but true & true == true
+  typedef __true_type tp;
+};
+
+#define AND_(trait)                                                     \
+   typedef typename __and_trait<typename __type_traits<Key>::trait,     \
+                                typename __type_traits< T >::trait>::tp \
+   trait
+
+template <class Key, class T>
+struct __type_traits< STL_NAMESPACE::pair<const Key, T> > {
+  AND_(has_trivial_default_constructor);
+  AND_(has_trivial_copy_constructor);
+  AND_(has_trivial_assignment_operator);
+  AND_(has_trivial_destructor);
+  AND_(is_POD_type);
+};
+
+#undef AND_
+
+#endif   /* #defined UNDERSTANDS_TYPE_TRAITS && _ANDED_TRAITS_ */
+
+
+_START_GOOGLE_NAMESPACE_
+
+using STL_NAMESPACE::pair;
+
+template <class Key, class T,
+          class HashFcn = HASH_NAMESPACE::hash<Key>,
+          class EqualKey = STL_NAMESPACE::equal_to<Key>,
+          class Alloc = STL_NAMESPACE::allocator<T> >
+class sparse_hash_map {
+
+ private:
+  // Apparently select1st is not stl-standard, so we define our own
+  struct SelectKey {
+    const Key& operator()(const pair<const Key, T>& p) const { 
+      return p.first;
+    }
+  };
+
+  // The actual data
+  typedef sparse_hashtable<pair<const Key, T>, Key, HashFcn,
+                           SelectKey, EqualKey, Alloc> ht;
+  ht rep;
+
+ public:
+  typedef typename ht::key_type key_type;
+  typedef T data_type;
+  typedef T mapped_type;
+  typedef typename ht::value_type value_type;
+  typedef typename ht::hasher hasher;
+  typedef typename ht::key_equal key_equal;
+
+  typedef typename ht::size_type size_type;
+  typedef typename ht::difference_type difference_type;
+  typedef typename ht::pointer pointer;
+  typedef typename ht::const_pointer const_pointer;
+  typedef typename ht::reference reference;
+  typedef typename ht::const_reference const_reference;
+
+  typedef typename ht::iterator iterator;
+  typedef typename ht::const_iterator const_iterator;
+
+  // Iterator functions
+  iterator begin()                    { return rep.begin(); }
+  iterator end()                      { return rep.end(); }
+  const_iterator begin() const        { return rep.begin(); }
+  const_iterator end() const          { return rep.end(); }
+
+
+  // Accessor functions
+  hasher hash_funct() const { return rep.hash_funct(); }
+  key_equal key_eq() const  { return rep.key_eq(); }
+
+
+  // Constructors
+  explicit sparse_hash_map(size_type n = 0,
+                           const hasher& hf = hasher(),
+                           const key_equal& eql = key_equal()) 
+    : rep(n, hf, eql) { }
+  
+  template <class InputIterator>
+  sparse_hash_map(InputIterator f, InputIterator l,
+                  size_type n = 0,
+                  const hasher& hf = hasher(),
+                  const key_equal& eql = key_equal()) {
+    rep.insert(f, l);
+  }
+  // We use the default copy constructor
+  // We use the default operator=()
+  // We use the default destructor
+
+  void clear()                        { rep.clear(); }
+  void swap(sparse_hash_map& hs)      { rep.swap(hs.rep); }
+
+
+  // Functions concerning size
+  size_type size() const              { return rep.size(); }
+  size_type max_size() const          { return rep.max_size(); }
+  bool empty() const                  { return rep.empty(); }
+  size_type bucket_count() const      { return rep.bucket_count(); }
+  size_type max_bucket_count() const  { return rep.max_bucket_count(); }
+
+  void resize(size_type hint)         { rep.resize(hint); }
+
+
+  // Lookup routines
+  iterator find(const key_type& key)                 { return rep.find(key); }
+  const_iterator find(const key_type& key) const     { return rep.find(key); }
+
+  data_type& operator[](const key_type& key) {       // This is our value-add!
+    return (*((rep.insert(value_type(key, data_type()))).first)).second;
+  }
+
+  size_type count(const key_type& key) const         { return rep.count(key); }
+  
+  pair<iterator, iterator> equal_range(const key_type& key) {
+    return rep.equal_range(key);
+  }
+  pair<const_iterator, const_iterator> equal_range(const key_type& key) const {
+    return rep.equal_range(key);
+  }
+
+  // Insertion routines
+  pair<iterator, bool> insert(const value_type& obj) { return rep.insert(obj); }
+  template <class InputIterator>
+  void insert(InputIterator f, InputIterator l)      { rep.insert(f, l); }
+  void insert(const_iterator f, const_iterator l)    { rep.insert(f, l); }
+  // required for std::insert_iterator; the passed-in iterator is ignored
+  iterator insert(iterator, const value_type& obj)   { return insert(obj).first; }
+
+
+  // Deletion routines
+  // THESE ARE NON-STANDARD!  I make you specify an "impossible" key
+  // value to identify deleted buckets.  You can change the key as
+  // time goes on, or get rid of it entirely to be insert-only.
+  void set_deleted_key(const key_type& key)   {
+    rep.set_deleted_key(key);
+  }
+  void clear_deleted_key()                    { rep.clear_deleted_key(); }
+
+  // These are standard
+  size_type erase(const key_type& key)               { return rep.erase(key); }
+  void erase(iterator it)                            { rep.erase(it); }
+  void erase(iterator f, iterator l)                 { rep.erase(f, l); }
+
+
+  // Comparison
+  bool operator==(const sparse_hash_map& hs) const   { return rep == hs.rep; }
+  bool operator!=(const sparse_hash_map& hs) const   { return rep != hs.rep; }
+
+
+  // I/O -- this is an add-on for writing metainformation to disk
+  bool write_metadata(FILE *fp)       { return rep.write_metadata(fp); }
+  bool read_metadata(FILE *fp)        { return rep.read_metadata(fp); }
+  bool write_nopointer_data(FILE *fp) { return rep.write_nopointer_data(fp); }
+  bool read_nopointer_data(FILE *fp)  { return rep.read_nopointer_data(fp); }
+};
+
+// We need a global swap as well
+template <class Key, class T, class HashFcn, class EqualKey, class Alloc>
+inline void swap(sparse_hash_map<Key, T, HashFcn, EqualKey, Alloc>& hm1,
+                 sparse_hash_map<Key, T, HashFcn, EqualKey, Alloc>& hm2) {
+  hm1.swap(hm2);
+}
+
+_END_GOOGLE_NAMESPACE_
+
+#endif /* _SPARSE_HASH_MAP_H_ */
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/dense_hash_map
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/dense_hash_map	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/google/dense_hash_map	(revision 2162)
@@ -0,0 +1,285 @@
+// Copyright (c) 2005, Google Inc.
+// All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+// 
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+// 
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// ----
+// Author: Craig Silverstein
+//
+// This is just a very thin wrapper over densehashtable.h, just
+// like sgi stl's stl_hash_map is a very thin wrapper over 
+// stl_hashtable.  The major thing we define is operator[], because
+// we have a concept of a data_type which stl_hashtable doesn't
+// (it only has a key and a value).
+//
+// NOTE: this is exactly like sparse_hash_map.h, with the word
+// "sparse" replaced by "dense", except for the addition of
+// set_empty_key().
+//
+//   YOU MUST CALL SET_EMPTY_KEY() IMMEDIATELY AFTER CONSTRUCTION.
+//
+// Otherwise your program will die in mysterious ways.
+//
+// In other respects, we adhere mostly to the STL semantics for
+// hash-map.  One important exception is that insert() invalidates
+// iterators entirely.  On the plus side, though, erase() doesn't
+// invalidate iterators at all, or even change the ordering of elements.
+//
+// Here are a few "power user" tips:
+//
+//    1) set_deleted_key():
+//         If you want to use erase() you must call set_deleted_key(),
+//         in addition to set_empty_key(), after construction.
+//
+//    2) resize(0):
+//         When an item is deleted, its memory isn't freed right
+//         away.  This allows you to iterate over a hashtable,
+//         and call erase(), without invalidating the iterator.
+//         To force the memory to be freed, call resize(0).
+//
+// Guide to what kind of hash_map to use:
+//   (1) dense_hash_map: fastest, uses the most memory
+//   (2) sparse_hash_map: slowest, uses the least memory
+//   (3) hash_map (STL): in the middle
+// Typically I use sparse_hash_map when I care about space and/or when
+// I need to save the hashtable on disk.  I use hash_map otherwise.  I
+// don't personally use dense_hash_map ever; the only use of
+// dense_hash_map I know of is to work around malloc() bugs in some
+// systems (dense_hash_map has a particularly simple allocation scheme).
+//
+// - dense_hash_map has, typically, a factor of 2 memory overhead (if your
+//   data takes up X bytes, the hash_map uses X more bytes in overhead).
+// - sparse_hash_map has about 2 bits overhead per entry.
+// - sparse_hash_map can be 3-7 times slower than the others for lookup and,
+//   especially, inserts.  See time_hash_map.cc for details.
+//
+// See /usr/(local/)?doc/sparsehash-0.1/dense_hash_map.html
+// for information about how to use this class.
+
+#ifndef _DENSE_HASH_MAP_H_
+#define _DENSE_HASH_MAP_H_
+
+#include <google/sparsehash/config.h>
+#include <stdio.h>                   // for FILE * in read()/write()
+#include <algorithm>                 // for the default template args
+#include <functional>                // for equal_to
+#include <memory>                    // for alloc<>
+#include <google/sparsehash/hash_fun.h>
+#include <google/sparsehash/densehashtable.h>
+
+
+// Lots of STLs don't support type traits, so we might just do without.
+// We also have a guard to make sure we don't include this code twice:
+// once for sparse_hash_map and once for dense_hash_map.
+#if defined(UNDERSTANDS_TYPE_TRAITS) && !defined(_ANDED_TRAITS_)
+#define _ANDED_TRAITS_
+
+#if defined HAVE_TYPE_TRAITS
+#include <type_traits.h>
+#elif defined HAVE_BITS_TYPE_TRAITS
+#include <bits/type_traits.h>
+#endif
+
+// We need to let the densetable know that our pair<Key,Data> is
+// a Plain Old Data type if both the Key and Data are.
+template <class Key, class T>       
+struct __and_trait {                             // by default x & y == false
+    typedef __false_type tp;
+};
+
+template <> struct __and_trait<__true_type, __true_type> {   // but true & true == true
+    typedef __true_type tp;
+};
+
+#define AND_(trait)                                                     \
+   typedef typename __and_trait<typename __type_traits<Key>::trait,     \
+                                typename __type_traits< T >::trait>::tp \
+   trait
+
+template <class Key, class T>
+struct __type_traits< STL_NAMESPACE::pair<const Key, T> > {
+  AND_(has_trivial_default_constructor);
+  AND_(has_trivial_copy_constructor);
+  AND_(has_trivial_assignment_operator);
+  AND_(has_trivial_destructor);
+  AND_(is_POD_type);
+};
+
+#undef AND_
+
+#endif   /* #defined UNDERSTANDS_TYPE_TRAITS && _ANDED_TRAITS_ */
+
+_START_GOOGLE_NAMESPACE_
+
+using STL_NAMESPACE::pair;
+
+template <class Key, class T,
+          class HashFcn = HASH_NAMESPACE::hash<Key>,
+          class EqualKey = STL_NAMESPACE::equal_to<Key>,
+          class Alloc = STL_NAMESPACE::allocator<T> >
+class dense_hash_map {
+
+ private:
+  // Apparently select1st is not stl-standard, so we define our own
+  struct SelectKey {
+    const Key& operator()(const pair<const Key, T>& p) const { 
+      return p.first;
+    }
+  };
+
+  // The actual data
+  typedef dense_hashtable<pair<const Key, T>, Key, HashFcn,
+                          SelectKey, EqualKey, Alloc> ht;
+  ht rep;
+
+ public:
+  typedef typename ht::key_type key_type;
+  typedef T data_type;
+  typedef T mapped_type;
+  typedef typename ht::value_type value_type;
+  typedef typename ht::hasher hasher;
+  typedef typename ht::key_equal key_equal;
+
+  typedef typename ht::size_type size_type;
+  typedef typename ht::difference_type difference_type;
+  typedef typename ht::pointer pointer;
+  typedef typename ht::const_pointer const_pointer;
+  typedef typename ht::reference reference;
+  typedef typename ht::const_reference const_reference;
+
+  typedef typename ht::iterator iterator;
+  typedef typename ht::const_iterator const_iterator;
+
+  // Iterator functions
+  iterator begin()                    { return rep.begin(); }
+  iterator end()                      { return rep.end(); }
+  const_iterator begin() const        { return rep.begin(); }
+  const_iterator end() const          { return rep.end(); }
+
+
+  // Accessor functions
+  hasher hash_funct() const { return rep.hash_funct(); }
+  key_equal key_eq() const  { return rep.key_eq(); }
+
+
+  // Constructors
+  explicit dense_hash_map(size_type n = 0,
+                          const hasher& hf = hasher(),
+                          const key_equal& eql = key_equal()) 
+    : rep(n, hf, eql) { }
+  
+  template <class InputIterator>
+  dense_hash_map(InputIterator f, InputIterator l,
+                 size_type n = 0,
+                 const hasher& hf = hasher(),
+                 const key_equal& eql = key_equal()) {
+    rep.insert(f, l);
+  }
+  // We use the default copy constructor
+  // We use the default operator=()
+  // We use the default destructor
+
+  void clear()                        { rep.clear(); }
+  void swap(dense_hash_map& hs)       { rep.swap(hs.rep); }
+
+
+  // Functions concerning size
+  size_type size() const              { return rep.size(); }
+  size_type max_size() const          { return rep.max_size(); }
+  bool empty() const                  { return rep.empty(); }
+  size_type bucket_count() const      { return rep.bucket_count(); }
+  size_type max_bucket_count() const  { return rep.max_bucket_count(); }
+
+  void resize(size_type hint)         { rep.resize(hint); }
+
+
+  // Lookup routines
+  iterator find(const key_type& key)                 { return rep.find(key); }
+  const_iterator find(const key_type& key) const     { return rep.find(key); }
+
+  data_type& operator[](const key_type& key) {       // This is our value-add!
+    return (*((rep.insert(value_type(key, data_type()))).first)).second;
+  }
+
+  size_type count(const key_type& key) const         { return rep.count(key); }
+  
+  pair<iterator, iterator> equal_range(const key_type& key) {
+    return rep.equal_range(key);
+  }
+  pair<const_iterator, const_iterator> equal_range(const key_type& key) const {
+    return rep.equal_range(key);
+  }
+  
+  // Insertion routines
+  pair<iterator, bool> insert(const value_type& obj) { return rep.insert(obj); }
+  template <class InputIterator>
+  void insert(InputIterator f, InputIterator l)      { rep.insert(f, l); }
+  void insert(const_iterator f, const_iterator l)    { rep.insert(f, l); }
+  // required for std::insert_iterator; the passed-in iterator is ignored
+  iterator insert(iterator, const value_type& obj)   { return insert(obj).first; }
+
+
+  // Deletion and empty routines
+  // THESE ARE NON-STANDARD!  I make you specify an "impossible" key
+  // value to identify deleted and empty buckets.  You can change the
+  // deleted key as time goes on, or get rid of it entirely to be insert-only.
+  void set_empty_key(const key_type& key)   {           // YOU MUST CALL THIS!
+    rep.set_empty_key(key);
+  }
+  void set_deleted_key(const key_type& key)   {
+    rep.set_deleted_key(key);
+  }
+  void clear_deleted_key()                    { rep.clear_deleted_key(); }
+
+  // These are standard
+  size_type erase(const key_type& key)               { return rep.erase(key); }
+  void erase(iterator it)                            { rep.erase(it); }
+  void erase(iterator f, iterator l)                 { rep.erase(f, l); }
+
+
+  // Comparison
+  bool operator==(const dense_hash_map& hs) const    { return rep == hs.rep; }
+  bool operator!=(const dense_hash_map& hs) const    { return rep != hs.rep; }
+
+
+  // I/O -- this is an add-on for writing metainformation to disk
+  bool write_metadata(FILE *fp)       { return rep.write_metadata(fp); }
+  bool read_metadata(FILE *fp)        { return rep.read_metadata(fp); }
+  bool write_nopointer_data(FILE *fp) { return rep.write_nopointer_data(fp); }
+  bool read_nopointer_data(FILE *fp)  { return rep.read_nopointer_data(fp); }
+};
+
+// We need a global swap as well
+template <class Key, class T, class HashFcn, class EqualKey, class Alloc>
+inline void swap(dense_hash_map<Key, T, HashFcn, EqualKey, Alloc>& hm1,
+                 dense_hash_map<Key, T, HashFcn, EqualKey, Alloc>& hm2) {
+  hm1.swap(hm2);
+}
+
+_END_GOOGLE_NAMESPACE_
+
+#endif /* _DENSE_HASH_MAP_H_ */
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/config.h.include
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/config.h.include	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/config.h.include	(revision 2162)
@@ -0,0 +1,27 @@
+/*** 
+ *** These are #defines that autoheader puts in config.h.in that we
+ *** actually want to show up in config.h.  The reason we don't take
+ *** everything that autoheader emits is that we have to include
+ *** config.h in installed header files, and we want to minimize the
+ *** number of #defines we make so as to not pollute the namespace.
+ ***/
+#undef GOOGLE_NAMESPACE
+#undef HASH_NAMESPACE
+#undef HAVE_U_INT16_T
+#undef HAVE___UINT16
+#undef HAVE_INTTYPES_H
+#undef HAVE_MEMCPY
+#undef HAVE_STDINT_H
+#undef STL_NAMESPACE
+#undef UNDERSTANDS_ITERATOR_TAGS
+#undef UNDERSTANDS_TYPE_TRAITS
+#undef HAVE_TYPE_TRAITS
+#undef _END_GOOGLE_NAMESPACE_
+#undef _START_GOOGLE_NAMESPACE_
+/***
+ *** These are only needed for the unittests and could go outside config.h
+ ***/
+#undef HAVE_SYS_RESOURCE_H
+#undef HAVE_UNISTD_H
+#undef HAVE_SYS_TIME_H
+#undef HAVE_SYS_UTSNAME_H
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/hashtable_unittest.cc
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/hashtable_unittest.cc	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/src/hashtable_unittest.cc	(revision 2162)
@@ -0,0 +1,510 @@
+// Copyright (c) 2005, Google Inc.
+// All rights reserved.
+// 
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+// 
+//     * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//     * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+// 
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// ---
+// Author: Craig Silverstein
+//
+// This tests <google/sparsehash/densehashtable.h>
+// This tests <google/dense_hash_set>
+// This tests <google/dense_hash_map>
+// This tests <google/sparsehash/sparsehashtable.h>
+// This tests <google/sparse_hash_set>
+// This tests <google/sparse_hash_map>
+
+// Since {dense,sparse}hashtable is templatized, it's important that
+// we test every function in every class in this file -- not just to
+// see if it works, but even if it compiles.
+
+#include <google/sparsehash/config.h>
+#include <stdio.h>
+#include <sys/stat.h>          // for stat()
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>            // for unlink()
+#endif
+#include <string.h>
+#include <time.h>              // for silly random-number-seed generator
+#include <math.h>              // for sqrt()
+#include <map>
+#include <iterator>            // for insert_iterator
+#include <iostream>
+#include <iomanip>             // for setprecision()
+#include <string>
+#include <google/sparsehash/hash_fun.h>
+#include <google/dense_hash_map>
+#include <google/dense_hash_set>
+#include <google/sparsehash/densehashtable.h>
+#include <google/sparse_hash_map>
+#include <google/sparse_hash_set>
+#include <google/sparsehash/sparsehashtable.h>
+
+using GOOGLE_NAMESPACE::sparse_hash_map;
+using GOOGLE_NAMESPACE::dense_hash_map;
+using GOOGLE_NAMESPACE::sparse_hash_set;
+using GOOGLE_NAMESPACE::dense_hash_set;
+using GOOGLE_NAMESPACE::sparse_hashtable;
+using GOOGLE_NAMESPACE::dense_hashtable;
+using STL_NAMESPACE::map;
+using STL_NAMESPACE::pair;
+using STL_NAMESPACE::string;
+using STL_NAMESPACE::insert_iterator;
+using STL_NAMESPACE::allocator;
+using STL_NAMESPACE::equal_to;
+using STL_NAMESPACE::ostream;
+
+#define LOGF  STL_NAMESPACE::cout   // where we log to; LOGF is a historical name
+
+#define CHECK(cond)  do {                       \
+  if (!(cond)) {                                \
+    LOGF << "Test failed: " #cond "\n";         \
+    exit(1);                                    \
+  }                                             \
+} while (0)
+
+const char *words[] = {"Baffin\n",        // in /usr/dict/words
+                       "Boffin\n",        // not in
+                       "baffin\n",        // not in
+                       "genial\n",        // last word in
+                       "Aarhus\n",        // first word alphabetically
+                       "Zurich\n",        // last word alphabetically
+};
+
+const char *nwords[] = {"Boffin\n",
+                        "baffin\n",
+};
+
+// Apparently identity is not stl-standard, so we define our own
+template<class Value>
+struct Identity {
+  Value& operator()(Value& v) const { return v; }
+  const Value& operator()(const Value& v) const { return v; }
+};
+
+// Let us log the pairs that make up a hash_map
+template<class P1, class P2>
+ostream& operator<<(ostream& s, const pair<P1, P2>& p) {
+  s << "pair(" << p.first << ", " << p.second << ")";
+  return s;
+}
+
+struct strcmp_fnc {
+  bool operator()(const char* s1, const char* s2) const {
+    return ((s1 == 0 && s2 == 0) ||
+            (s1 && s2 && *s1 == *s2 && strcmp(s1, s2) == 0));
+  }
+};
+
+
+template <class SparseTable, class T>
+static void set_empty_key(SparseTable *sp, T val) {
+}
+
+template <class T, class H, class I, class C, class A>
+static void set_empty_key(dense_hashtable<T,T,H,I,C,A> *ht, T val) {
+  ht->set_empty_key(val);
+}
+
+template <class T, class H, class C>
+static void set_empty_key(dense_hash_set<T,H,C> *ht, T val) {
+  ht->set_empty_key(val);
+}
+
+template <class K, class V, class H, class C>
+static void set_empty_key(dense_hash_map<K,V,H,C> *ht, K val) {
+  ht->set_empty_key(val);
+}
+
+
+template <class T, class H, class I, class C, class A>
+static void insert(dense_hashtable<T,T,H,I,C,A> *ht, T val) {
+  ht->insert(val);
+}
+
+template <class T, class H, class C>
+static void insert(dense_hash_set<T,H,C> *ht, T val) {
+  ht->insert(val);
+}
+
+template <class K, class V, class H, class C>
+static void insert(dense_hash_map<K,V,H,C> *ht, K val) {
+  ht->insert(pair<K,V>(val,V()));
+}
+
+template <class T, class H, class I, class C, class A>
+static void insert(sparse_hashtable<T,T,H,I,C,A> *ht, T val) {
+  ht->insert(val);
+}
+
+template <class T, class H, class C>
+static void insert(sparse_hash_set<T,H,C> *ht, T val) {
+  ht->insert(val);
+}
+
+template <class K, class V, class H, class C>
+static void insert(sparse_hash_map<K,V,H,C> *ht, K val) {
+  ht->insert(pair<K,V>(val,V()));
+}
+
+template <class HT, class Iterator>
+static void insert(HT *ht, Iterator begin, Iterator end) {
+  ht->insert(begin, end);
+}
+
+// For hashtable's and hash_set's, the iterator insert works fine (and
+// is used). But for the hash_map's, the iterator insert expects the
+// iterators to point to pair's. So by looping over and calling insert
+// on each element individually, the code below automatically expands
+// into inserting a pair.
+template <class K, class V, class H, class C, class Iterator>
+static void insert(dense_hash_map<K,V,H,C> *ht, Iterator begin, Iterator end) {
+  while (begin != end) {
+    insert(ht, *begin);
+    ++begin;
+  }
+}
+
+template <class K, class V, class H, class C, class Iterator>
+static void insert(sparse_hash_map<K,V,H,C> *ht, Iterator begin, Iterator end) {
+  while (begin != end) {
+    insert(ht, *begin);
+    ++begin;
+  }
+}
+
+// A version of insert that uses the insert_iterator.  But insert_iterator
+// isn't defined for the low level hashtable classes, so we just punt to insert.
+
+template <class T, class H, class I, class C, class A>
+static void iterator_insert(dense_hashtable<T,T,H,I,C,A>* ht, T val,
+                            insert_iterator<dense_hashtable<T,T,H,I,C,A> >* ) {
+  ht->insert(val);
+}
+
+template <class T, class H, class C>
+static void iterator_insert(dense_hash_set<T,H,C>* , T val,
+                            insert_iterator<dense_hash_set<T,H,C> >* ii) {
+  *(*ii)++ = val;
+}
+
+template <class K, class V, class H, class C>
+static void iterator_insert(dense_hash_map<K,V,H,C>* , K val,
+                            insert_iterator<dense_hash_map<K,V,H,C> >* ii) {
+  *(*ii)++ = pair<K,V>(val,V());
+}
+
+template <class T, class H, class I, class C, class A>
+static void iterator_insert(sparse_hashtable<T,T,H,I,C,A>* ht, T val,
+                            insert_iterator<sparse_hashtable<T,T,H,I,C,A> >* ) {
+  ht->insert(val);
+}
+
+template <class T, class H, class C>
+static void iterator_insert(sparse_hash_set<T,H,C>* , T val,
+                            insert_iterator<sparse_hash_set<T,H,C> >* ii) {
+  *(*ii)++ = val;
+}
+
+template <class K, class V, class H, class C>
+static void iterator_insert(sparse_hash_map<K,V,H,C> *, K val,
+                            insert_iterator<sparse_hash_map<K,V,H,C> >* ii) {
+  *(*ii)++ = pair<K,V>(val,V());
+}
+
+
+static void write_item(FILE *fp, const char *val) {
+  fwrite(val, strlen(val), 1, fp);   // \n serves to separate
+}
+
+// The weird 'const' declarations are desired by the compiler. Yucko.
+static void write_item(FILE *fp, const pair<char*const,int> &val) {
+  fwrite(val.first, strlen(val.first), 1, fp);
+}
+
+static char* read_line(FILE* fp, char* line, int linesize) {
+  if ( fgets(line, linesize, fp) == NULL )
+    return NULL;
+  // normalize windows files :-(
+  const int linelen = strlen(line);
+  if ( linelen >= 2 && line[linelen-2] == '\r' && line[linelen-1] == '\n' ) {
+    line[linelen-2] = '\n';
+    line[linelen-1] = '\0';
+  }
+  return line;
+}
+
+static void read_item(FILE *fp, char*const* val) {
+  char line[1024];
+  read_line(fp, line, sizeof(line));
+  char **p = const_cast<char**>(val);
+  *p = strdup(line);
+}
+
+static void read_item(FILE *fp, pair<char*const,int> *val) {
+  char line[1024];
+  read_line(fp, line, sizeof(line));
+  char **p = const_cast<char**>(&val->first);
+  *p = strdup(line);
+}
+
+static void free_item(char*const* val) {
+  free(*val);
+}
+
+static void free_item(pair<char*const,int> *val) {
+  free(val->first);
+}
+
+
+// The read_write parameters specifies whether the read/write tests
+// should be performed. Note that densehashtable::write_metdata is not
+// implemented, so we only do the read/write tests for the
+// sparsehashtable varieties.
+template<class ht, class htint>
+void test(bool read_write) {
+  htint y(1000);
+  htint z(64);
+  set_empty_key(&y, 0xefefef);
+  set_empty_key(&z, 0xefefef);
+
+  CHECK(y.empty());
+  insert(&y, 1);
+  CHECK(!y.empty());
+  insert(&y, 11);
+  insert(&y, 111);
+  insert(&y, 1111);
+  insert(&y, 11111);
+  insert(&y, 111111);
+  insert(&y, 1111111);     // 1M, more or less
+  insert(&y, 11111111);
+  insert(&y, 111111111);
+  insert(&y, 1111111111);  // 1B, more or less
+  for ( int i = 0; i < 32; ++i )
+    insert(&z, i);
+  // test the second half of the insert with an insert_iterator
+  insert_iterator<htint> insert_iter(z, z.begin());
+  for ( int i = 32; i < 64; ++i )
+    iterator_insert(&z, i, &insert_iter);
+
+  for ( typename htint::const_iterator it = y.begin(); it != y.end(); ++it )
+    LOGF << "y: " << *it << "\n";
+  z.insert(y.begin(), y.end());
+  swap(y,z);
+  for ( typename htint::iterator it = y.begin(); it != y.end(); ++it )
+    LOGF << "y+z: " << *it << "\n";
+  LOGF << "z has " << z.bucket_count() << " buckets\n";
+  LOGF << "y has " << y.bucket_count() << " buckets\n";
+  LOGF << "z size: " << z.size() << "\n";
+
+  for (int i = 0; i < 64; ++i)
+    CHECK(y.find(i) != y.end());
+
+  CHECK(z.size() == 10);
+  z.set_deleted_key(1010101010);      // an unused value
+  z.erase(11111);
+  CHECK(z.size() == 9);
+  insert(&z, 11111);                  // should retake deleted value
+  CHECK(z.size() == 10);
+  // Do the delete/insert again.  Last time we probably resized; this time no
+  z.erase(11111);
+  insert(&z, 11111);                  // should retake deleted value
+  CHECK(z.size() == 10);
+
+  z.erase(-11111);                    // shouldn't do anything
+  CHECK(z.size() == 10);
+  z.erase(1);
+  CHECK(z.size() == 9);
+  typename htint::iterator itdel = z.find(1111);
+  z.erase(itdel);
+  CHECK(z.size() == 8);
+  itdel = z.find(2222);               // should be end()
+  z.erase(itdel);                     // shouldn't do anything
+  CHECK(z.size() == 8);
+  for ( typename htint::const_iterator it = z.begin(); it != z.end(); ++it )
+    LOGF << "y: " << *it << "\n";
+  z.set_deleted_key(1010101011);      // a different unused value
+  for ( typename htint::const_iterator it = z.begin(); it != z.end(); ++it )
+    LOGF << "y: " << *it << "\n";
+  LOGF << "That's " << z.size() << " elements\n";
+  z.erase(z.begin(), z.end());
+  CHECK(z.empty());
+
+  y.clear();
+  CHECK(y.empty());
+  LOGF << "y has " << y.bucket_count() << " buckets\n";
+
+  ht w;
+  set_empty_key(&w, (char*) NULL);
+  insert(&w, const_cast<char **>(nwords),
+         const_cast<char **>(nwords) + sizeof(nwords) / sizeof(*nwords));
+  LOGF << "w has " << w.size() << " items\n";
+  CHECK(w.size() == 2);
+  CHECK(w == w);
+
+  ht x;
+  set_empty_key(&x, (char*) NULL);
+  long dict_size = 1;        // for size stats -- can't be 0 'cause of division
+
+  map<string, int> counts;
+  // Hash the dictionary
+  {
+    // automake says 'look for all data files in $srcdir.'  OK.
+    string filestr = (string(getenv("srcdir") ? getenv("srcdir") : ".") +
+                      "/src/words");
+    const char* file = filestr.c_str();
+    FILE *fp = fopen(file, "rb");
+    if ( fp == NULL ) {
+      LOGF << "Can't open " << file << " skipping dictionary hash...";
+    } else {
+      char line[1024];
+      while ( read_line(fp, line, sizeof(line)) ) {
+        insert(&x, strdup(line));
+        counts[line] = 0;
+      }
+      LOGF << "Read " << x.size() << " words from " << file << "\n";
+      fclose(fp);
+      struct stat buf;
+      stat(file, &buf);
+      dict_size = buf.st_size;
+      LOGF << "Size of " << file << ": " << buf.st_size << " bytes\n";
+      for ( char **word = const_cast<char **>(words);
+            word < const_cast<char **>(words) + sizeof(words) / sizeof(*words);
+            ++word ) {
+        if (x.find(*word) == x.end()) {
+          CHECK(w.find(*word) != w.end());
+        } else {
+          CHECK(w.find(*word) == w.end());
+        }
+      }
+    }
+  }
+  CHECK(counts.size() == x.size());
+
+  // Save the hashtable.
+  if (read_write) {
+    const char* file = "/tmp/#hashtable_unittest_dicthash";
+    FILE *fp = fopen(file, "wb");
+    if ( fp == NULL ) {
+      // maybe we can't write to /tmp/.  Try the current directory
+      file = "#hashtable_unittest_dicthash";
+      fp = fopen(file, "wb");
+    }
+    if ( fp == NULL ) {
+      LOGF << "Can't open " << file << " skipping hashtable save...";
+    } else {
+      x.write_metadata(fp);        // this only writes meta-information
+      int count = 0;
+      for ( typename ht::iterator it = x.begin(); it != x.end(); ++it ) {
+        write_item(fp, *it);
+        free_item(&(*it));
+        ++count;
+      }
+      LOGF << "Wrote " << count << " words to " << file << "\n";
+      fclose(fp);
+      struct stat buf;
+      stat(file, &buf);
+      LOGF << "Size of " << file << ": " << buf.st_size << " bytes\n";
+      LOGF << STL_NAMESPACE::setprecision(3)
+           << "Hashtable overhead "
+           << (buf.st_size - dict_size) * 100.0 / dict_size
+           << "% ("
+           << (buf.st_size - dict_size) * 8.0 / count
+           << " bits/entry)\n";
+      x.clear();
+
+      // Load the hashtable
+      fp = fopen(file, "rb");
+      if ( fp == NULL ) {
+        LOGF << "Can't open " << file << " skipping hashtable reload...";
+      } else {
+        x.read_metadata(fp);      // reads metainformation
+        LOGF << "Hashtable size: " << x.size() << "\n";
+        int count = 0;
+        for ( typename ht::iterator it = x.begin(); it != x.end(); ++it ) {
+          read_item(fp, &(*it));
+          ++count;
+        }
+        LOGF << "Read " << count << " words from " << file << "\n";
+        fclose(fp);
+        unlink(file);
+        for ( char **word = const_cast<char **>(words);
+              word < const_cast<char **>(words) + sizeof(words) / sizeof(*words);
+              ++word ) {
+          if (x.find(*word) == x.end()) {
+            CHECK(w.find(*word) != w.end());
+          } else {
+            CHECK(w.find(*word) == w.end());
+          }
+        }
+      }
+    }
+  }
+  for ( typename ht::iterator it = x.begin(); it != x.end(); ++it ) {
+    free_item(&(*it));
+  }
+}
+
+int main(int argc, char **argv) {
+  // First try with the low-level hashtable interface
+  LOGF << "\n\nTEST WITH DENSE_HASHTABLE\n\n";
+  test<dense_hashtable<char *, char *, HASH_NAMESPACE::hash<char *>,
+                       Identity<char *>, strcmp_fnc, allocator<char *> >,
+       dense_hashtable<int, int, HASH_NAMESPACE::hash<int>,
+                       Identity<int>, equal_to<int>, allocator<int> > >(
+                         false);
+
+  // Now try with hash_set, which should be equivalent
+  LOGF << "\n\nTEST WITH DENSE_HASH_SET\n\n";
+  test<dense_hash_set<char *, HASH_NAMESPACE::hash<char *>, strcmp_fnc>,
+       dense_hash_set<int> >(false);
+
+  // Now try with hash_map, which differs only in insert()
+  LOGF << "\n\nTEST WITH DENSE_HASH_MAP\n\n";
+  test<dense_hash_map<char *, int, HASH_NAMESPACE::hash<char *>, strcmp_fnc>,
+    dense_hash_map<int, int> >(false);
+
+  // First try with the low-level hashtable interface
+  LOGF << "\n\nTEST WITH SPARSE_HASHTABLE\n\n";
+  test<sparse_hashtable<char *, char *, HASH_NAMESPACE::hash<char *>,
+                       Identity<char *>, strcmp_fnc, allocator<char *> >,
+       sparse_hashtable<int, int, HASH_NAMESPACE::hash<int>,
+                       Identity<int>, equal_to<int>, allocator<int> > >(
+                         true);
+
+  // Now try with hash_set, which should be equivalent
+  LOGF << "\n\nTEST WITH SPARSE_HASH_SET\n\n";
+  test<sparse_hash_set<char *, HASH_NAMESPACE::hash<char *>, strcmp_fnc>,
+       sparse_hash_set<int> >(true);
+
+  // Now try with hash_map, which differs only in insert()
+  LOGF << "\n\nTEST WITH SPARSE_HASH_MAP\n\n";
+  test<sparse_hash_map<char *, int, HASH_NAMESPACE::hash<char *>, strcmp_fnc>,
+       sparse_hash_map<int, int> >(true);
+
+  LOGF << "\nAll tests pass.\n";
+  return 0;
+}
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/ChangeLog
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/ChangeLog	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/ChangeLog	(revision 2162)
@@ -0,0 +1,32 @@
+Fri Jan 14 16:53:32 2005  Google Inc. <opensource@google.com>
+
+	* sparsehash: initial release:
+	  The sparsehash package contains several hash-map implementations,
+	  similar in API to SGI's hash_map class, but with different
+	  performance characteristics.  sparse_hash_map uses very little
+	  space overhead: 1-2 bits per entry.  dense_hash_map is typically
+	  faster than the default SGI STL implementation.  This package
+	  also includes hash-set analogues of these classes.
+
+Mon May  2 07:04:46 2005  Google Inc. <opensource@google.com>
+
+	* sparsehash: version 0.2 release
+	* Preliminary support for msvc++ compilation. (csilvers)
+	* Documentation fixes -- some example code was incomplete! (csilvers)
+	* Minimize size of config.h to avoid other-package conflicts (csilvers)
+	* Contribute a C-based version of sparsehash that served as the
+	  inspiration for this code.  One day, I hope to clean it up and
+	  support it, but for now it's just in experimental/, for playing
+	  around with. (csilvers)
+	* Change default namespace from std to google. (csilvers)
+
+Thu Nov  3 20:12:31 2005  Google Inc. <opensource@google.com>
+
+	* sparsehash: version 0.3 release
+	* Quiet compiler warnings on some compilers. (csilvers)
+	* Some documentation fixes: example code for dense_hash_map. (csilvers)
+	* Fix a bug where swap() wasn't swapping delete_key(). (csilvers)
+	* set_deleted_key() and set_empty_key() now take a key only,
+	  allowing hash-map values to be forward-declared. (csilvers)
+	* support for std::insert_iterator (and std::inserter). (csilvers)
+
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/depcomp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/depcomp	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/depcomp	(revision 2162)
@@ -0,0 +1,423 @@
+#! /bin/sh
+
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+# `libtool' can also be set to `yes' or `no'.
+
+if test -z "$depfile"; then
+   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
+   dir=`echo "$object" | sed 's,/.*$,/,'`
+   if test "$dir" = "$object"; then
+      dir=
+   fi
+   # FIXME: should be _deps on DOS.
+   depfile="$dir.deps/$base"
+fi
+
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  This file always lives in the current directory.
+  # Also, the AIX compiler puts `$object:' at the start of each line;
+  # $object doesn't have directory information.
+  stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  outname="$stripped.o"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      tmpdepfile1="$dir.libs/$base.lo.d"
+      tmpdepfile2="$dir.libs/$base.d"
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1="$dir$base.o.d"
+      tmpdepfile2="$dir$base.d"
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2"
+      exit $stat
+   fi
+
+   if test -f "$tmpdepfile1"; then
+      tmpdepfile="$tmpdepfile1"
+   else
+      tmpdepfile="$tmpdepfile2"
+   fi
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a space and a tab in the [].
+      sed -e 's,^.*\.[a-z]*:[ 	]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.  We will use -o /dev/null later,
+  # however we can't do the remplacement now because
+  # `-o $object' might simply not be used
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ 	]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    -*)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/compile
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/compile	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/compile	(revision 2162)
@@ -0,0 +1,99 @@
+#! /bin/sh
+
+# Wrapper for compilers which do not understand `-c -o'.
+
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Usage:
+# compile PROGRAM [ARGS]...
+# `-o FOO.o' is removed from the args passed to the actual compile.
+
+prog=$1
+shift
+
+ofile=
+cfile=
+args=
+while test $# -gt 0; do
+   case "$1" in
+    -o)
+       # configure might choose to run compile as `compile cc -o foo foo.c'.
+       # So we do something ugly here.
+       ofile=$2
+       shift
+       case "$ofile" in
+	*.o | *.obj)
+	   ;;
+	*)
+	   args="$args -o $ofile"
+	   ofile=
+	   ;;
+       esac
+       ;;
+    *.c)
+       cfile=$1
+       args="$args $1"
+       ;;
+    *)
+       args="$args $1"
+       ;;
+   esac
+   shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+   # If no `-o' option was seen then we might have been invoked from a
+   # pattern rule where we don't need one.  That is ok -- this is a
+   # normal compilation that the losing compiler can handle.  If no
+   # `.c' file was seen then we are probably linking.  That is also
+   # ok.
+   exec "$prog" $args
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
+while true; do
+   if mkdir $lockdir > /dev/null 2>&1; then
+      break
+   fi
+   sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir $lockdir; exit 1" 1 2 15
+
+# Run the compile.
+"$prog" $args
+status=$?
+
+if test -f "$cofile"; then
+   mv "$cofile" "$ofile"
+fi
+
+rmdir $lockdir
+exit $status
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/config.guess
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/config.guess	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/config.guess	(revision 2162)
@@ -0,0 +1,1317 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+#   Free Software Foundation, Inc.
+
+timestamp='2001-09-04'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Written by Per Bothner <bothner@cygnus.com>.
+# Please send patches to <config-patches@gnu.org>.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script.
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int dummy(){}" > $dummy.c ;
+	for c in cc gcc c89 ; do
+	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
+	  if test $? = 0 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	rm -f $dummy.c $dummy.o $dummy.rel ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# Netbsd (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	# Determine the machine/vendor (is the vendor relevant).
+	case "${UNAME_MACHINE}" in
+	    amiga) machine=m68k-unknown ;;
+	    arm32) machine=arm-unknown ;;
+	    atari*) machine=m68k-atari ;;
+	    sun3*) machine=m68k-sun ;;
+	    mac68k) machine=m68k-apple ;;
+	    macppc) machine=powerpc-apple ;;
+	    hp3[0-9][05]) machine=m68k-hp ;;
+	    ibmrt|romp-ibm) machine=romp-ibm ;;
+	    *) machine=${UNAME_MACHINE}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE}" in
+	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit 0 ;;
+    alpha:OSF1:*:*)
+	if test $UNAME_RELEASE = "V4.0"; then
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+	fi
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	cat <<EOF >$dummy.s
+	.data
+\$Lformat:
+	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
+
+	.text
+	.globl main
+	.align 4
+	.ent main
+main:
+	.frame \$30,16,\$26,0
+	ldgp \$29,0(\$27)
+	.prologue 1
+	.long 0x47e03d80 # implver \$0
+	lda \$2,-1
+	.long 0x47e20c21 # amask \$2,\$1
+	lda \$16,\$Lformat
+	mov \$0,\$17
+	not \$1,\$18
+	jsr \$26,printf
+	ldgp \$29,0(\$26)
+	mov 0,\$16
+	jsr \$26,exit
+	.end main
+EOF
+	eval $set_cc_for_build
+	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+	if test "$?" = 0 ; then
+		case `./$dummy` in
+			0-0)
+				UNAME_MACHINE="alpha"
+				;;
+			1-0)
+				UNAME_MACHINE="alphaev5"
+				;;
+			1-1)
+				UNAME_MACHINE="alphaev56"
+				;;
+			1-101)
+				UNAME_MACHINE="alphapca56"
+				;;
+			2-303)
+				UNAME_MACHINE="alphaev6"
+				;;
+			2-307)
+				UNAME_MACHINE="alphaev67"
+				;;
+			2-1307)
+				UNAME_MACHINE="alphaev68"
+				;;
+		esac
+	fi
+	rm -f $dummy.s $dummy
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit 0 ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit 0 ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit 0;;
+    amiga:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit 0 ;;
+    arc64:OpenBSD:*:*)
+	echo mips64el-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    arc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    hkmips:OpenBSD:*:*)
+	echo mips-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    pmax:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sgi:OpenBSD:*:*)
+	echo mips-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit 0;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit 0;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit 0 ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit 0 ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    i86pc:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit 0 ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit 0 ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    sparc*:NetBSD:*)
+	echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit 0 ;;
+    sun3*:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mac68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit 0 ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit 0 ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit 0 ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD $dummy.c -o $dummy \
+	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit 0 ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit 0 ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit 0 ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit 0 ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit 0 ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit 0 ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit 0 ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit 0 ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit 0 ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
+	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit 0 ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+		rm -f $dummy.c $dummy
+		echo rs6000-ibm-aix3.2.5
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit 0 ;;
+    *:AIX:*:[45])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit 0 ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit 0 ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit 0 ;;                           # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit 0 ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit 0 ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit 0 ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit 0 ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+              case "${HPUX_REV}" in
+                11.[0-9][0-9])
+                  if [ -x /usr/bin/getconf ]; then
+                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                        esac ;;
+                    esac
+                  fi ;;
+              esac
+              if [ "${HP_ARCH}" = "" ]; then
+	      eval $set_cc_for_build
+              sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+	    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+	    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+	    rm -f $dummy.c $dummy
+	fi ;;
+	esac
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	echo unknown-hitachi-hiuxwe2
+	exit 0 ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit 0 ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit 0 ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit 0 ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit 0 ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit 0 ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit 0 ;;
+    hppa*:OpenBSD:*:*)
+	echo hppa-unknown-openbsd
+	exit 0 ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit 0 ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit 0 ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit 0 ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit 0 ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit 0 ;;
+    CRAY*X-MP:*:*:*)
+	echo xmp-cray-unicos
+        exit 0 ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*T3D:*:*:*)
+	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY-2:*:*:*)
+	echo cray2-cray-unicos
+        exit 0 ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit 0 ;;
+    hp300:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:FreeBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit 0 ;;
+    *:OpenBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+	exit 0 ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit 0 ;;
+    i*:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit 0 ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit 0 ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i386-pc-interix
+	exit 0 ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit 0 ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit 0 ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    *:GNU:*:*)
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit 0 ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit 0 ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux
+	exit 0 ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    mips:Linux:*:*)
+	case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
+	  big)    echo mips-unknown-linux-gnu && exit 0 ;;
+	  little) echo mipsel-unknown-linux-gnu && exit 0 ;;
+	esac
+	;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit 0 ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit 0 ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit 0 ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit 0 ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    x86_64:Linux:*:*)
+	echo x86_64-unknown-linux-gnu
+	exit 0 ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	ld_supported_targets=`cd /; ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit 0 ;;		
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit 0 ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit 0 ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	cat >$dummy.c <<EOF
+#include <features.h>
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __ELF__
+# ifdef __GLIBC__
+#  if __GLIBC__ >= 2
+    printf ("%s-pc-linux-gnu\n", argv[1]);
+#  else
+    printf ("%s-pc-linux-gnulibc1\n", argv[1]);
+#  endif
+# else
+   printf ("%s-pc-linux-gnulibc1\n", argv[1]);
+# endif
+#else
+  printf ("%s-pc-linux-gnuaout\n", argv[1]);
+#endif
+  return 0;
+}
+EOF
+	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit 0 ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit 0 ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit 0 ;;
+    i*86:*:5:[78]*)
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit 0 ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit 0 ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit 0 ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit 0 ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit 0 ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit 0 ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit 0 ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit 0 ;;
+    M68*:*:R3V[567]*:*)
+	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit 0 ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit 0 ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit 0 ;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit 0 ;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo hppa1.1-stratus-vos
+	exit 0 ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit 0 ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit 0 ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit 0 ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit 0 ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit 0 ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Darwin:*:*)
+	echo `uname -p`-apple-darwin${UNAME_RELEASE}
+	exit 0 ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	if test "${UNAME_MACHINE}" = "x86pc"; then
+		UNAME_MACHINE=pc
+	fi
+	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
+	exit 0 ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit 0 ;;
+    NSR-[KW]:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit 0 ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit 0 ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit 0 ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit 0 ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit 0 ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit 0 ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit 0 ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit 0 ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit 0 ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit 0 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit 0 ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit 0 ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit 0 ;;
+    c34*)
+	echo c34-convex-bsd
+	exit 0 ;;
+    c38*)
+	echo c38-convex-bsd
+	exit 0 ;;
+    c4*)
+	echo c4-convex-bsd
+	exit 0 ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/sparsehash.sln
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/sparsehash.sln	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/sparsehash.sln	(revision 2162)
@@ -0,0 +1,37 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "time_hash_map", "time_hash_map.vcproj", "{AAF9EAEE-03FC-4789-8477-296295C9B6B4}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sparsetable_unittest", "sparsetable_unittest.vcproj", "{AAF9EAEE-03FC-4789-8477-296295C9B6B5}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hashtable_unittest", "hashtable_unittest.vcproj", "{AAF9EAEE-03FC-4789-8477-296295C9B6B5}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AAF9EAEE-03FC-4789-8477-296295C9B6B4}.Debug.ActiveCfg = Debug|Win32
+		{AAF9EAEE-03FC-4789-8477-296295C9B6B4}.Debug.Build.0 = Debug|Win32
+		{AAF9EAEE-03FC-4789-8477-296295C9B6B4}.Release.ActiveCfg = Release|Win32
+		{AAF9EAEE-03FC-4789-8477-296295C9B6B4}.Release.Build.0 = Release|Win32
+		{AAF9EAEE-03FC-4789-8477-296295C9B6B5}.Debug.ActiveCfg = Debug|Win32
+		{AAF9EAEE-03FC-4789-8477-296295C9B6B5}.Debug.Build.0 = Debug|Win32
+		{AAF9EAEE-03FC-4789-8477-296295C9B6B5}.Release.ActiveCfg = Release|Win32
+		{AAF9EAEE-03FC-4789-8477-296295C9B6B5}.Release.Build.0 = Release|Win32
+		{AAF9EAEE-03FC-4789-8477-296295C9B6B5}.Debug.ActiveCfg = Debug|Win32
+		{AAF9EAEE-03FC-4789-8477-296295C9B6B5}.Debug.Build.0 = Debug|Win32
+		{AAF9EAEE-03FC-4789-8477-296295C9B6B5}.Release.ActiveCfg = Release|Win32
+		{AAF9EAEE-03FC-4789-8477-296295C9B6B5}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/hashtable_unittest.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/hashtable_unittest.vcproj	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/hashtable_unittest.vcproj	(revision 2162)
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="hashtable_unittest"
+	ProjectGUID="{AAF9EAEE-03FC-4789-8477-296295C9B6B5}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="5"
+				UsePrecompiledHeader="3"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="4"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/hashtable_unittestd.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/hashtable_unittestd.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="4"
+				UsePrecompiledHeader="3"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/hashtable_unittest.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="FALSE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\src\hashtable_unittest.cc">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories="./src"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories="./src"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Include Files">
+			<File
+				RelativePath=".\src\google\sparsehash\config.h">
+			</File>
+			<File
+				RelativePath=".\src\google\sparsehash\densehashtable.h">
+			</File>
+			<File
+				RelativePath=".\src\google\sparsehash\hash_fun.h">
+			</File>
+			<File
+				RelativePath=".\src\google\sparsehash\sparsehashtable.h">
+			</File>
+			<File
+				RelativePath=".\src\google\sparsehash\std_hash_fun.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/experimental/libchash.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/experimental/libchash.h	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/experimental/libchash.h	(revision 2162)
@@ -0,0 +1,252 @@
+/* Copyright (c) 1998 - 2005, Google Inc.
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * 
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ---
+ * Author: Craig Silverstein
+ *
+ *  This library is intended to be used for in-memory hash tables,
+ *  though it provides rudimentary permanent-storage capabilities.
+ *  It attempts to be fast, portable, and small.  The best algorithm
+ *  to fulfill these goals is an internal probing hashing algorithm,
+ *  as in Knuth, _Art of Computer Programming_, vol III.  Unlike
+ *  chained (open) hashing, it doesn't require a pointer for every
+ *  item, yet it is still constant time lookup in practice.
+ *
+ *  Also to save space, we let the contents (both data and key) that
+ *  you insert be a union: if the key/data is small, we store it
+ *  directly in the hashtable, otherwise we store a pointer to it.
+ *  To keep you from having to figure out which, use KEY_PTR and
+ *  PTR_KEY to convert between the arguments to these functions and
+ *  a pointer to the real data.  For instance:
+ *     char key[] = "ab", *key2;
+ *     HTItem *bck; HashTable *ht;
+ *     HashInsert(ht, PTR_KEY(ht, key), 0);
+ *     bck = HashFind(ht, PTR_KEY(ht, "ab"));
+ *     key2 = KEY_PTR(ht, bck->key);
+ *
+ *  There are a rich set of operations supported:
+ *     AllocateHashTable() -- Allocates a hashtable structure and
+ *                            returns it.
+ *        cchKey: if it's a positive number, then each key is a
+ *                fixed-length record of that length.  If it's 0,
+ *                the key is assumed to be a \0-terminated string.
+ *        fSaveKey: normally, you are responsible for allocating
+ *                  space for the key.  If this is 1, we make a
+ *                  copy of the key for you.
+ *     ClearHashTable() -- Removes everything from a hashtable
+ *     FreeHashTable() -- Frees memory used by a hashtable
+ *
+ *     HashFind() -- takes a key (use PTR_KEY) and returns the
+ *                   HTItem containing that key, or NULL if the
+ *                   key is not in the hashtable.
+ *     HashFindLast() -- returns the item found by last HashFind()
+ *     HashFindOrInsert() -- inserts the key/data pair if the key
+ *                           is not already in the hashtable, or
+ *                           returns the appropraite HTItem if it is.
+ *     HashFindOrInsertItem() -- takes key/data as an HTItem.
+ *     HashInsert() -- adds a key/data pair to the hashtable.  What
+ *                     it does if the key is already in the table
+ *                     depends on the value of SAMEKEY_OVERWRITE.
+ *     HashInsertItem() -- takes key/data as an HTItem.
+ *     HashDelete() -- removes a key/data pair from the hashtable,
+ *                     if it's there.  RETURNS 1 if it was there,
+ *                     0 else.
+ *        If you use sparse tables and never delete, the full data
+ *        space is available.  Otherwise we steal -2 (maybe -3),
+ *        so you can't have data fields with those values.
+ *     HashDeleteLast() -- deletes the item returned by the last Find().
+ *
+ *     HashFirstBucket() -- used to iterate over the buckets in a 
+ *                          hashtable.  DON'T INSERT OR DELETE WHILE
+ *                          ITERATING!  You can't nest iterations.
+ *     HashNextBucket() -- RETURNS NULL at the end of iterating.
+ *
+ *     HashSetDeltaGoalSize() -- if you're going to insert 1000 items
+ *                               at once, call this fn with arg 1000.
+ *                               It grows the table more intelligently.
+ *
+ *     HashSave() -- saves the hashtable to a file.  It saves keys ok,
+ *                   but it doesn't know how to interpret the data field,
+ *                   so if the data field is a pointer to some complex
+ *                   structure, you must send a function that takes a
+ *                   file pointer and a pointer to the structure, and
+ *                   write whatever you want to write.  It should return
+ *                   the number of bytes written.  If the file is NULL,
+ *                   it should just return the number of bytes it would
+ *                   write, without writing anything.
+ *                      If your data field is just an integer, not a
+ *                   pointer, just send NULL for the function.
+ *     HashLoad() -- loads a hashtable.  It needs a function that takes
+ *                   a file and the size of the structure, and expects
+ *                   you to read in the structure and return a pointer
+ *                   to it.  You must do memory allocation, etc.  If
+ *                   the data is just a number, send NULL.
+ *     HashLoadKeys() -- unlike HashLoad(), doesn't load the data off disk
+ *                       until needed.  This saves memory, but if you look
+ *                       up the same key a lot, it does a disk access each
+ *                       time.
+ *        You can't do Insert() or Delete() on hashtables that were loaded
+ *        from disk.
+ */
+
+#include <sys/types.h>         /* includes definition of "ulong", we hope */
+#define ulong u_long
+
+#define MAGIC_KEY             "CHsh"   /* when we save the file */
+
+#ifndef LOG_WORD_SIZE                  /* 5 for 32 bit words, 6 for 64 */
+#ifdef __alpha                         /* only way I know of determining */
+#define LOG_WORD_SIZE          6       /* log_2(sizeof(ulong)) [in bits] */
+#else
+#define LOG_WORD_SIZE          5       /* log_2(sizeof(ulong)) [in bits] */
+#endif
+#endif
+
+   /* The following gives a speed/time tradeoff: how many buckets are  *
+    * in each bin.  0 gives 32 buckets/bin, which is a good number.    */
+#ifndef LOG_BM_WORDS
+#define LOG_BM_WORDS        0      /* each group has 2^L_B_W * 32 buckets */
+#endif
+
+   /* The following are all parameters that affect performance. */
+#ifndef JUMP
+#define JUMP(key, offset)   ( ++(offset) )  /* ( 1 ) for linear hashing */
+#endif
+#ifndef Table
+#define Table(x)            Sparse##x       /* Dense##x for dense tables */
+#endif
+#ifndef FAST_DELETE
+#define FAST_DELETE         0      /* if it's 1, we never shrink the ht */
+#endif
+#ifndef SAMEKEY_OVERWRITE
+#define SAMEKEY_OVERWRITE   1      /* overwrite item with our key on insert? */
+#endif
+#ifndef OCCUPANCY_PCT
+#define OCCUPANCY_PCT       0.5    /* large PCT means smaller and slower */
+#endif
+#ifndef MIN_HASH_SIZE
+#define MIN_HASH_SIZE       512    /* ht size when first created */
+#endif
+   /* When deleting a bucket, we can't just empty it (future hashes  *
+    * may fail); instead we set the data field to DELETED.  Thus you *
+    * should set DELETED to a data value you never use.  Better yet, *
+    * if you don't need to delete, define INSERT_ONLY.               */
+#ifndef INSERT_ONLY
+#define DELETED                   -2UL
+#define IS_BCK_DELETED(bck)       ( (bck) && (bck)->data == DELETED )
+#define SET_BCK_DELETED(ht, bck)  do { (bck)->data = DELETED;                \
+                                       FREE_KEY(ht, (bck)->key); } while ( 0 )
+#else
+#define IS_BCK_DELETED(bck)       0
+#define SET_BCK_DELETED(ht, bck)  \
+   do { fprintf(stderr, "Deletion not supported for insert-only hashtable\n");\
+        exit(2); } while ( 0 )
+#endif
+
+   /* We need the following only for dense buckets (Dense##x above).  *
+    * If you need to, set this to a value you'll never use for data.  */
+#define EMPTY -3UL                /* steal more of the bck->data space */
+
+
+   /* This is what an item is.  Either can be cast to a pointer. */
+typedef struct {
+   ulong data;        /* 4 bytes for data: either a pointer or an integer */
+   ulong key;         /* 4 bytes for the key: either a pointer or an int */
+} HTItem;
+
+struct Table(Bin);                            /* defined in chash.c, I hope */
+struct Table(Iterator);
+typedef struct Table(Bin)       Table;        /* Expands to SparseBin, etc */
+typedef struct Table(Iterator)  TableIterator;
+
+   /* for STORES_PTR to work ok, cchKey MUST BE DEFINED 1st, cItems 2nd! */
+typedef struct HashTable {
+   ulong cchKey;        /* the length of the key, or if it's \0 terminated */
+   ulong cItems;        /* number of items currently in the hashtable */
+   ulong cDeletedItems; /* # of buckets holding DELETE in the hashtable */
+   ulong cBuckets;      /* size of the table */
+   Table *table;        /* The actual contents of the hashtable */
+   int fSaveKeys;       /* 1 if we copy keys locally; 2 if keys in one block */
+   int cDeltaGoalSize;  /* # of coming inserts (or deletes, if <0) we expect */
+   HTItem *posLastFind; /* position of last Find() command */
+   TableIterator *iter; /* used in First/NextBucket */
+
+   FILE *fpData;        /* if non-NULL, what item->data points into */
+   char * (*dataRead)(FILE *, int);   /* how to load data from disk */
+   HTItem bckData;      /* holds data after being loaded from disk */
+} HashTable;
+
+   /* Small keys are stored and passed directly, but large keys are
+    * stored and passed as pointers.  To make it easier to remember
+    * what to pass, we provide two functions:
+    *   PTR_KEY: give it a pointer to your data, and it returns
+    *            something appropriate to send to Hash() functions or
+    *            be stored in a data field.
+    *   KEY_PTR: give it something returned by a Hash() routine, and
+    *            it returns a (char *) pointer to the actual data.
+    */
+#define HashKeySize(ht)   ( ((ulong *)(ht))[0] )  /* this is how we inline */
+#define HashSize(ht)      ( ((ulong *)(ht))[1] )  /* ...a la C++ :-) */
+
+#define STORES_PTR(ht)    ( HashKeySize(ht) == 0 || \
+			    HashKeySize(ht) > sizeof(ulong) )
+#define KEY_PTR(ht, key)  ( STORES_PTR(ht) ? (char *)(key) : (char *)&(key) )
+#ifdef DONT_HAVE_TO_WORRY_ABOUT_BUS_ERRORS
+#define PTR_KEY(ht, ptr)  ( STORES_PTR(ht) ? (ulong)(ptr) : *(ulong *)(ptr) )
+#else
+#define PTR_KEY(ht, ptr)  ( STORES_PTR(ht) ? (ulong)(ptr) : HTcopy((char *)ptr))
+#endif
+
+
+   /* Function prototypes */
+unsigned long HTcopy(char *pul);         /* for PTR_KEY, not for users */
+
+struct HashTable *AllocateHashTable(int cchKey, int fSaveKeys);
+void ClearHashTable(struct HashTable *ht);
+void FreeHashTable(struct HashTable *ht);
+
+HTItem *HashFind(struct HashTable *ht, ulong key);
+HTItem *HashFindLast(struct HashTable *ht);
+HTItem *HashFindOrInsert(struct HashTable *ht, ulong key, ulong dataInsert);
+HTItem *HashFindOrInsertItem(struct HashTable *ht, HTItem *pItem);
+
+HTItem *HashInsert(struct HashTable *ht, ulong key, ulong data);
+HTItem *HashInsertItem(struct HashTable *ht, HTItem *pItem);
+
+int HashDelete(struct HashTable *ht, ulong key);
+int HashDeleteLast(struct HashTable *ht);
+
+HTItem *HashFirstBucket(struct HashTable *ht);
+HTItem *HashNextBucket(struct HashTable *ht);
+
+int HashSetDeltaGoalSize(struct HashTable *ht, int delta);
+
+void HashSave(FILE *fp, struct HashTable *ht, int (*write)(FILE *, char *));
+struct HashTable *HashLoad(FILE *fp, char * (*read)(FILE *, int));
+struct HashTable *HashLoadKeys(FILE *fp, char * (*read)(FILE *, int));
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/experimental/example.c
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/experimental/example.c	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/experimental/example.c	(revision 2162)
@@ -0,0 +1,54 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include "libchash.h"
+
+static void TestInsert() {
+  struct HashTable* ht;
+  HTItem* bck;
+
+  ht = AllocateHashTable(1, 0);    /* value is 1 byte, 0: don't copy keys */
+
+  HashInsert(ht, PTR_KEY(ht, "January"), 31);  /* 0: don't overwrite old val */
+  bck = HashInsert(ht, PTR_KEY(ht, "February"), 28);
+  bck = HashInsert(ht, PTR_KEY(ht, "March"), 31);
+
+  bck = HashFind(ht, PTR_KEY(ht, "February"));
+  assert(bck);
+  assert(bck->data == 28);
+
+  FreeHashTable(ht);
+}
+
+static void TestFindOrInsert() {
+  struct HashTable* ht;
+  int i;
+  int iterations = 1000000;
+  int range = 30;         /* random number between 1 and 30 */
+
+  ht = AllocateHashTable(4, 0);    /* value is 4 bytes, 0: don't copy keys */
+
+  /* We'll test how good rand() is as a random number generator */
+  for (i = 0; i < iterations; ++i) {
+    int key = rand() % range;
+    HTItem* bck = HashFindOrInsert(ht, key, 0);     /* initialize to 0 */
+    bck->data++;                   /* found one more of them */
+  }
+
+  for (i = 0; i < range; ++i) {
+    HTItem* bck = HashFind(ht, i);
+    if (bck) {
+      printf("%3d: %d\n", bck->key, bck->data);
+    } else {
+      printf("%3d: 0\n", i);
+    }
+  }
+
+  FreeHashTable(ht);
+}
+
+int main(int argc, char** argv) {
+  TestInsert();
+  TestFindOrInsert();
+  return 0;
+}
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/experimental/Makefile
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/experimental/Makefile	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/experimental/Makefile	(revision 2162)
@@ -0,0 +1,9 @@
+example: example.o libchash.o
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+
+.SUFFIXES: .c .o .h
+.c.o:
+	$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
+
+example.o: example.c libchash.h
+libchash.o: libchash.c libchash.h
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/experimental/README
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/experimental/README	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/experimental/README	(revision 2162)
@@ -0,0 +1,14 @@
+This is a C version of sparsehash (and also, maybe, densehash) that I
+wrote way back when, and served as the inspiration for the C++
+version.  The API for the C version is much uglier than the C++,
+because of the lack of template support.  I believe the class works,
+but I'm not convinced it's really flexible or easy enough to use.
+
+It would be nice to rework this C class to follow the C++ API as
+closely as possible (eg have a set_deleted_key() instead of using a
+#define like this code does now).  I believe the code compiles and
+runs, if anybody is interested in using it now, but it's subject to
+major change in the future, as people work on it.
+
+Craig Silverstein
+20 March 2005
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/experimental/libchash.c
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/experimental/libchash.c	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/experimental/libchash.c	(revision 2162)
@@ -0,0 +1,1535 @@
+/* Copyright (c) 1998 - 2005, Google Inc.
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * 
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ---
+ * Author: Craig Silverstein
+ *
+ *  This library is intended to be used for in-memory hash tables,
+ *  though it provides rudimentary permanent-storage capabilities.
+ *  It attempts to be fast, portable, and small.  The best algorithm
+ *  to fulfill these goals is an internal probing hashing algorithm,
+ *  as in Knuth, _Art of Computer Programming_, vol III.  Unlike
+ *  chained (open) hashing, it doesn't require a pointer for every
+ *  item, yet it is still constant time lookup in practice.
+ *
+ *  Also to save space, we let the contents (both data and key) that
+ *  you insert be a union: if the key/data is small, we store it
+ *  directly in the hashtable, otherwise we store a pointer to it.
+ *  To keep you from having to figure out which, use KEY_PTR and
+ *  PTR_KEY to convert between the arguments to these functions and
+ *  a pointer to the real data.  For instance:
+ *     char key[] = "ab", *key2;
+ *     HTItem *bck; HashTable *ht;
+ *     HashInsert(ht, PTR_KEY(ht, key), 0);
+ *     bck = HashFind(ht, PTR_KEY(ht, "ab"));
+ *     key2 = KEY_PTR(ht, bck->key);
+ *
+ *  There are a rich set of operations supported:
+ *     AllocateHashTable() -- Allocates a hashtable structure and
+ *                            returns it.
+ *        cchKey: if it's a positive number, then each key is a
+ *                fixed-length record of that length.  If it's 0,
+ *                the key is assumed to be a \0-terminated string.
+ *        fSaveKey: normally, you are responsible for allocating
+ *                  space for the key.  If this is 1, we make a
+ *                  copy of the key for you.
+ *     ClearHashTable() -- Removes everything from a hashtable
+ *     FreeHashTable() -- Frees memory used by a hashtable
+ *
+ *     HashFind() -- takes a key (use PTR_KEY) and returns the
+ *                   HTItem containing that key, or NULL if the
+ *                   key is not in the hashtable.
+ *     HashFindLast() -- returns the item found by last HashFind()
+ *     HashFindOrInsert() -- inserts the key/data pair if the key
+ *                           is not already in the hashtable, or
+ *                           returns the appropraite HTItem if it is.
+ *     HashFindOrInsertItem() -- takes key/data as an HTItem.
+ *     HashInsert() -- adds a key/data pair to the hashtable.  What
+ *                     it does if the key is already in the table
+ *                     depends on the value of SAMEKEY_OVERWRITE.
+ *     HashInsertItem() -- takes key/data as an HTItem.
+ *     HashDelete() -- removes a key/data pair from the hashtable,
+ *                     if it's there.  RETURNS 1 if it was there,
+ *                     0 else.
+ *        If you use sparse tables and never delete, the full data
+ *        space is available.  Otherwise we steal -2 (maybe -3),
+ *        so you can't have data fields with those values.
+ *     HashDeleteLast() -- deletes the item returned by the last Find().
+ *
+ *     HashFirstBucket() -- used to iterate over the buckets in a 
+ *                          hashtable.  DON'T INSERT OR DELETE WHILE
+ *                          ITERATING!  You can't nest iterations.
+ *     HashNextBucket() -- RETURNS NULL at the end of iterating.
+ *
+ *     HashSetDeltaGoalSize() -- if you're going to insert 1000 items
+ *                               at once, call this fn with arg 1000.
+ *                               It grows the table more intelligently.
+ *
+ *     HashSave() -- saves the hashtable to a file.  It saves keys ok,
+ *                   but it doesn't know how to interpret the data field,
+ *                   so if the data field is a pointer to some complex
+ *                   structure, you must send a function that takes a
+ *                   file pointer and a pointer to the structure, and
+ *                   write whatever you want to write.  It should return
+ *                   the number of bytes written.  If the file is NULL,
+ *                   it should just return the number of bytes it would
+ *                   write, without writing anything.
+ *                      If your data field is just an integer, not a
+ *                   pointer, just send NULL for the function.
+ *     HashLoad() -- loads a hashtable.  It needs a function that takes
+ *                   a file and the size of the structure, and expects
+ *                   you to read in the structure and return a pointer
+ *                   to it.  You must do memory allocation, etc.  If
+ *                   the data is just a number, send NULL.
+ *     HashLoadKeys() -- unlike HashLoad(), doesn't load the data off disk
+ *                       until needed.  This saves memory, but if you look
+ *                       up the same key a lot, it does a disk access each
+ *                       time.
+ *        You can't do Insert() or Delete() on hashtables that were loaded
+ *        from disk.
+ *
+ *  See libchash.h for parameters you can modify.  Make sure LOG_WORD_SIZE
+ *  is defined correctly for your machine!  (5 for 32 bit words, 6 for 64).
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>       /* for strcmp, memcmp, etc */
+#include <sys/types.h>    /* ULTRIX needs this for in.h */
+#include <netinet/in.h>   /* for reading/writing hashtables */
+#include <assert.h>
+#include "libchash.h"     /* all the types */
+
+   /* if keys are stored directly but cchKey is less than sizeof(ulong), */
+   /* this cuts off the bits at the end */
+char grgKeyTruncMask[sizeof(ulong)][sizeof(ulong)];
+#define KEY_TRUNC(ht, key)                                                    \
+   ( STORES_PTR(ht) || (ht)->cchKey == sizeof(ulong)                          \
+       ? (key) : ((key) & *(ulong *)&(grgKeyTruncMask[(ht)->cchKey][0])) )
+
+   /* round num up to a multiple of wordsize.  (LOG_WORD_SIZE-3 is in bytes) */
+#define WORD_ROUND(num)         ( ((num-1) | ((1<<(LOG_WORD_SIZE-3))-1)) + 1 )
+#define NULL_TERMINATED  0    /* val of cchKey if keys are null-term strings */
+
+   /* Useful operations we do to keys: compare them, copy them, free them */
+
+#define KEY_CMP(ht, key1, key2)      ( !STORES_PTR(ht)  ? (key1) - (key2) :   \
+                                       (key1) == (key2) ? 0 :                 \
+                                       HashKeySize(ht) == NULL_TERMINATED ?   \
+                                          strcmp((char *)key1, (char *)key2) :\
+                                          memcmp((void *)key1, (void *)key2,  \
+						 HashKeySize(ht)) )
+
+#define COPY_KEY(ht, keyTo, keyFrom) do                                       \
+   if ( !STORES_PTR(ht) || !(ht)->fSaveKeys )                                 \
+      (keyTo) = (keyFrom);                     /* just copy pointer or info */\
+   else if ( (ht)->cchKey == NULL_TERMINATED )        /* copy 0-term.ed str */\
+   {                                                                          \
+      (keyTo) = (ulong)HTsmalloc( WORD_ROUND(strlen((char *)(keyFrom))+1) );  \
+      strcpy((char *)(keyTo), (char *)(keyFrom));                             \
+   }                                                                          \
+   else                                                                       \
+   {                                                                          \
+      (keyTo) = (ulong) HTsmalloc( WORD_ROUND((ht)->cchKey) );                \
+      memcpy( (char *)(keyTo), (char *)(keyFrom), (ht)->cchKey);              \
+   }                                                                          \
+   while ( 0 )
+
+#define FREE_KEY(ht, key) do                                                  \
+   if ( STORES_PTR(ht) && (ht)->fSaveKeys )                                   \
+     if ( (ht)->cchKey == NULL_TERMINATED )                                   \
+        HTfree((char *)(key), WORD_ROUND(strlen((char *)(key))+1));           \
+     else                                                                     \
+        HTfree((char *)(key), WORD_ROUND((ht)->cchKey));                      \
+   while ( 0 )
+
+   /* the following are useful for bitmaps */
+   /* Format is like this (if 1 word = 4 bits):  3210 7654 ba98 fedc ... */
+typedef ulong          HTBitmapPart;  /* this has to be unsigned, for >> */
+typedef HTBitmapPart   HTBitmap[1<<LOG_BM_WORDS];
+typedef ulong          HTOffset; /* something big enough to hold offsets */
+
+#define BM_BYTES(cBuckets)   /* we must ensure it's a multiple of word size */\
+   ( (((cBuckets) + 8*sizeof(ulong)-1) >> LOG_WORD_SIZE) << (LOG_WORD_SIZE-3) )
+#define MOD2(i, logmod)      ( (i) & ((1<<(logmod))-1) )
+#define DIV_NUM_ENTRIES(i)   ( (i) >> LOG_WORD_SIZE )
+#define MOD_NUM_ENTRIES(i)   ( MOD2(i, LOG_WORD_SIZE) )
+#define MODBIT(i)            ( ((ulong)1) << MOD_NUM_ENTRIES(i) )
+
+#define TEST_BITMAP(bm, i)   ( (bm)[DIV_NUM_ENTRIES(i)] & MODBIT(i) ? 1 : 0 )
+#define SET_BITMAP(bm, i)    (bm)[DIV_NUM_ENTRIES(i)] |= MODBIT(i)
+#define CLEAR_BITMAP(bm, i)  (bm)[DIV_NUM_ENTRIES(i)] &= ~MODBIT(i)
+
+   /* the following are useful for reading and writing hashtables */
+#define READ_UL(fp, data)                  \
+   do {                                    \
+      long _ul;                            \
+      fread(&_ul, sizeof(_ul), 1, (fp));   \
+      data = ntohl(_ul);                   \
+   } while (0)
+
+#define WRITE_UL(fp, data)                 \
+   do {                                    \
+      long _ul = htonl((long)(data));      \
+      fwrite(&_ul, sizeof(_ul), 1, (fp));  \
+   } while (0)
+
+   /* Moves data from disk to memory if necessary.  Note dataRead cannot be  *
+    * NULL, because then we might as well (and do) load the data into memory */
+#define LOAD_AND_RETURN(ht, loadCommand)     /* lC returns an HTItem * */     \
+   if ( !(ht)->fpData )          /* data is stored in memory */               \
+      return (loadCommand);                                                   \
+   else                          /* must read data off of disk */             \
+   {                                                                          \
+      int cchData;                                                            \
+      HTItem *bck;                                                            \
+      if ( (ht)->bckData.data )  free((char *)(ht)->bckData.data);            \
+      ht->bckData.data = (ulong)NULL;   /* needed if loadCommand fails */     \
+      bck = (loadCommand);                                                    \
+      if ( bck == NULL )          /* loadCommand failed: key not found */     \
+         return NULL;                                                         \
+      else                                                                    \
+         (ht)->bckData = *bck;                                                \
+      fseek(ht->fpData, (ht)->bckData.data, SEEK_SET);                        \
+      READ_UL((ht)->fpData, cchData);                                         \
+      (ht)->bckData.data = (ulong)(ht)->dataRead((ht)->fpData, cchData);      \
+      return &((ht)->bckData);                                                \
+   }
+
+
+/* ======================================================================== */
+/*                          UTILITY ROUTINES                                */
+/*                       ----------------------                             */
+
+/* HTsmalloc() -- safe malloc
+ *    allocates memory, or crashes if the allocation fails.
+ */
+static void *HTsmalloc(unsigned long size)
+{
+   void *retval;
+
+   if ( size == 0 )
+      return NULL;
+   retval = (void *)malloc(size);
+   if ( !retval )
+   {
+      fprintf(stderr, "HTsmalloc: Unable to allocate %lu bytes of memory\n",
+	      size);
+      exit(1);
+   }
+   return retval;
+}
+
+/* HTscalloc() -- safe calloc
+ *    allocates memory and initializes it to 0, or crashes if
+ *    the allocation fails.
+ */
+static void *HTscalloc(unsigned long size)
+{
+   void *retval;
+
+   retval = (void *)calloc(size, 1);
+   if ( !retval && size > 0 )
+   {
+      fprintf(stderr, "HTscalloc: Unable to allocate %lu bytes of memory\n",
+	      size);
+      exit(1);
+   }
+   return retval;
+}
+
+/* HTsrealloc() -- safe calloc
+ *    grows the amount of memory from a source, or crashes if
+ *    the allocation fails.
+ */
+static void *HTsrealloc(void *ptr, unsigned long new_size, long delta)
+{
+   if ( ptr == NULL )
+      return HTsmalloc(new_size);
+   ptr = realloc(ptr, new_size);
+   if ( !ptr && new_size > 0 )
+   {
+      fprintf(stderr, "HTsrealloc: Unable to reallocate %lu bytes of memory\n",
+	      new_size);
+      exit(1);
+   }
+   return ptr;
+}
+
+/* HTfree() -- keep track of memory use
+ *    frees memory using free, but updates count of how much memory
+ *    is being used.
+ */
+static void HTfree(void *ptr, unsigned long size)
+{
+   if ( size > 0 )         /* some systems seem to not like freeing NULL */
+      free(ptr);
+}
+
+/*************************************************************************\
+| HTcopy()                                                                |
+|     Sometimes we interpret data as a ulong.  But ulongs must be         |
+|     aligned on some machines, so instead of casting we copy.            |
+\*************************************************************************/
+
+unsigned long HTcopy(char *ul)
+{
+   unsigned long retval;
+
+   memcpy(&retval, ul, sizeof(retval));
+   return retval;
+}
+
+/*************************************************************************\
+| HTSetupKeyTrunc()                                                       |
+|     If keys are stored directly but cchKey is less than                 |
+|     sizeof(ulong), this cuts off the bits at the end.                   |
+\*************************************************************************/
+   
+static void HTSetupKeyTrunc(void)
+{
+   int i, j;
+
+   for ( i = 0; i < sizeof(unsigned long); i++ )
+      for ( j = 0; j < sizeof(unsigned long); j++ )
+	 grgKeyTruncMask[i][j] = j < i ? 255 : 0;   /* chars have 8 bits */
+}
+
+
+/* ======================================================================== */
+/*                            TABLE ROUTINES                                */
+/*                         --------------------                             */
+
+/*  The idea is that a hashtable with (logically) t buckets is divided
+ *  into t/M groups of M buckets each.  (M is a constant set in
+ *  LOG_BM_WORDS for efficiency.)  Each group is stored sparsely.
+ *  Thus, inserting into the table causes some array to grow, which is
+ *  slow but still constant time.  Lookup involves doing a
+ *  logical-position-to-sparse-position lookup, which is also slow but
+ *  constant time.  The larger M is, the slower these operations are
+ *  but the less overhead (slightly).
+ *
+ *  To store the sparse array, we store a bitmap B, where B[i] = 1 iff
+ *  bucket i is non-empty.  Then to look up bucket i we really look up
+ *  array[# of 1s before i in B].  This is constant time for fixed M.
+ *
+ *  Terminology: the position of an item in the overall table (from
+ *  1 .. t) is called its "location."  The logical position in a group
+ *  (from 1 .. M ) is called its "position."  The actual location in
+ *  the array (from 1 .. # of non-empty buckets in the group) is
+ *  called its "offset."
+ *
+ *  The following operations are supported:
+ *     o Allocate an array with t buckets, all empty
+ *     o Free a array (but not whatever was stored in the buckets)
+ *     o Tell whether or not a bucket is empty
+ *     o Return a bucket with a given location
+ *     o Set the value of a bucket at a given location
+ *     o Iterate through all the buckets in the array
+ *     o Read and write an occupancy bitmap to disk
+ *     o Return how much memory is being allocated by the array structure
+ */
+
+#ifndef SparseBucket            /* by default, each bucket holds an HTItem */
+#define SparseBucket            HTItem
+#endif
+
+typedef struct SparseBin {
+   SparseBucket *binSparse;
+   HTBitmap bmOccupied;      /* bmOccupied[i] is 1 if bucket i has an item */
+   short cOccupied;          /* size of binSparse; useful for iterators, eg */
+} SparseBin;
+
+typedef struct SparseIterator {
+   long posGroup;
+   long posOffset;
+   SparseBin *binSparse;     /* state info, to avoid args for NextBucket() */
+   ulong cBuckets;
+} SparseIterator;
+
+#define LOG_LOW_BIN_SIZE        ( LOG_BM_WORDS+LOG_WORD_SIZE )
+#define SPARSE_GROUPS(cBuckets) ( (((cBuckets)-1) >> LOG_LOW_BIN_SIZE) + 1 )
+
+   /* we need a small function to figure out # of items set in the bm */
+static HTOffset EntriesUpto(HTBitmapPart *bm, int i)
+{                                       /* returns # of set bits in 0..i-1 */
+   HTOffset retval = 0; 
+   static HTOffset rgcBits[256] =             /* # of bits set in one char */
+      {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
+       1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
+       1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
+       2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+       1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
+       2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+       2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+       3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+       1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
+       2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+       2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+       3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+       2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+       3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+       3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+       4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8};
+
+   if ( i == 0 ) return 0;
+   for ( ; i > sizeof(*bm)*8; i -= sizeof(*bm)*8, bm++ )
+   {                                       /* think of it as loop unrolling */
+#if LOG_WORD_SIZE >= 3                     /* 1 byte per word, or more */
+      retval += rgcBits[*bm & 255];        /* get the low byte */
+#if LOG_WORD_SIZE >= 4                     /* at least 2 bytes */
+      retval += rgcBits[(*bm >> 8) & 255];
+#if LOG_WORD_SIZE >= 5                     /* at least 4 bytes */
+      retval += rgcBits[(*bm >> 16) & 255];
+      retval += rgcBits[(*bm >> 24) & 255];
+#if LOG_WORD_SIZE >= 6                     /* 8 bytes! */
+      retval += rgcBits[(*bm >> 32) & 255];
+      retval += rgcBits[(*bm >> 40) & 255];
+      retval += rgcBits[(*bm >> 48) & 255];
+      retval += rgcBits[(*bm >> 56) & 255];
+#if LOG_WORD_SIZE >= 7                     /* not a concern for a while... */
+#error Need to rewrite EntriesUpto to support such big words
+#endif   /* >8 bytes */
+#endif   /* 8 bytes */
+#endif   /* 4 bytes */
+#endif   /* 2 bytes */
+#endif   /* 1 byte */
+   }
+   switch ( i ) {                         /* from 0 to 63 */
+      case 0:
+	 return retval;
+#if LOG_WORD_SIZE >= 3                     /* 1 byte per word, or more */
+      case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8:
+	 return (retval + rgcBits[*bm & ((1 << i)-1)]);
+#if LOG_WORD_SIZE >= 4                     /* at least 2 bytes */
+      case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16:
+	 return (retval + rgcBits[*bm & 255] + 
+		 rgcBits[(*bm >> 8) & ((1 << (i-8))-1)]);
+#if LOG_WORD_SIZE >= 5                     /* at least 4 bytes */
+      case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24:
+	 return (retval + rgcBits[*bm & 255] + rgcBits[(*bm >> 8) & 255] +
+		 rgcBits[(*bm >> 16) & ((1 << (i-16))-1)]);
+      case 25: case 26: case 27: case 28: case 29: case 30: case 31: case 32:
+	 return (retval + rgcBits[*bm & 255] + rgcBits[(*bm >> 8) & 255] +
+		 rgcBits[(*bm >> 16) & 255] + 
+		 rgcBits[(*bm >> 24) & ((1 << (i-24))-1)]);
+#if LOG_WORD_SIZE >= 6                     /* 8 bytes! */
+      case 33: case 34: case 35: case 36: case 37: case 38: case 39: case 40:
+	 return (retval + rgcBits[*bm & 255] + rgcBits[(*bm >> 8) & 255] +
+		 rgcBits[(*bm >> 16) & 255] + rgcBits[(*bm >> 24) & 255] + 
+		 rgcBits[(*bm >> 32) & ((1 << (i-32))-1)]);
+      case 41: case 42: case 43: case 44: case 45: case 46: case 47: case 48:
+	 return (retval + rgcBits[*bm & 255] + rgcBits[(*bm >> 8) & 255] +
+		 rgcBits[(*bm >> 16) & 255] + rgcBits[(*bm >> 24) & 255] + 
+		 rgcBits[(*bm >> 32) & 255] +
+		 rgcBits[(*bm >> 40) & ((1 << (i-40))-1)]);
+      case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56:
+	 return (retval + rgcBits[*bm & 255] + rgcBits[(*bm >> 8) & 255] +
+		 rgcBits[(*bm >> 16) & 255] + rgcBits[(*bm >> 24) & 255] + 
+		 rgcBits[(*bm >> 32) & 255] + rgcBits[(*bm >> 40) & 255] +
+		 rgcBits[(*bm >> 48) & ((1 << (i-48))-1)]);
+      case 57: case 58: case 59: case 60: case 61: case 62: case 63: case 64:
+	 return (retval + rgcBits[*bm & 255] + rgcBits[(*bm >> 8) & 255] +
+		 rgcBits[(*bm >> 16) & 255] + rgcBits[(*bm >> 24) & 255] + 
+		 rgcBits[(*bm >> 32) & 255] + rgcBits[(*bm >> 40) & 255] +
+		 rgcBits[(*bm >> 48) & 255] + 
+		 rgcBits[(*bm >> 56) & ((1 << (i-56))-1)]);
+#endif   /* 8 bytes */
+#endif   /* 4 bytes */
+#endif   /* 2 bytes */
+#endif   /* 1 byte */
+   }
+   assert("" == "word size is too big in EntriesUpto()");
+   return -1;
+}
+#define SPARSE_POS_TO_OFFSET(bm, i)   ( EntriesUpto(&((bm)[0]), i) )
+#define SPARSE_BUCKET(bin, location)  \
+   ( (bin)[(location) >> LOG_LOW_BIN_SIZE].binSparse +                     \
+      SPARSE_POS_TO_OFFSET((bin)[(location)>>LOG_LOW_BIN_SIZE].bmOccupied, \
+		           MOD2(location, LOG_LOW_BIN_SIZE)) )
+
+
+/*************************************************************************\
+| SparseAllocate()                                                        |
+| SparseFree()                                                            |
+|     Allocates, sets-to-empty, and frees a sparse array.  All you need   |
+|     to tell me is how many buckets you want.  I return the number of    |
+|     buckets I actually allocated, setting the array as a parameter.     |
+|     Note that you have to set auxilliary parameters, like cOccupied.    |
+\*************************************************************************/
+
+static ulong SparseAllocate(SparseBin **pbinSparse, ulong cBuckets)
+{
+   int cGroups = SPARSE_GROUPS(cBuckets);
+
+   *pbinSparse = (SparseBin *) HTscalloc(sizeof(**pbinSparse) * cGroups);
+   return cGroups << LOG_LOW_BIN_SIZE;
+}
+
+static SparseBin *SparseFree(SparseBin *binSparse, ulong cBuckets)
+{
+   ulong iGroup, cGroups = SPARSE_GROUPS(cBuckets);
+
+   for ( iGroup = 0; iGroup < cGroups; iGroup++ )
+      HTfree(binSparse[iGroup].binSparse, (sizeof(*binSparse[iGroup].binSparse)
+					   * binSparse[iGroup].cOccupied));
+   HTfree(binSparse, sizeof(*binSparse) * cGroups);
+   return NULL;
+}
+
+/*************************************************************************\
+| SparseIsEmpty()                                                         |
+| SparseFind()                                                            |
+|     You give me a location (ie a number between 1 and t), and I         |
+|     return the bucket at that location, or NULL if the bucket is        |
+|     empty.  It's OK to call Find() on an empty table.                   |
+\*************************************************************************/
+
+static int SparseIsEmpty(SparseBin *binSparse, ulong location)
+{
+   return !TEST_BITMAP(binSparse[location>>LOG_LOW_BIN_SIZE].bmOccupied,
+		       MOD2(location, LOG_LOW_BIN_SIZE));
+}
+
+static SparseBucket *SparseFind(SparseBin *binSparse, ulong location)
+{
+   if ( SparseIsEmpty(binSparse, location) )
+      return NULL;
+   return SPARSE_BUCKET(binSparse, location);
+}
+
+/*************************************************************************\
+| SparseInsert()                                                          |
+|     You give me a location, and contents to put there, and I insert     |
+|     into that location and RETURN a pointer to the location.  If        |
+|     bucket was already occupied, I write over the contents only if      |
+|     *pfOverwrite is 1.  We set *pfOverwrite to 1 if there was someone   |
+|     there (whether or not we overwrote) and 0 else.                     |
+\*************************************************************************/
+
+static SparseBucket *SparseInsert(SparseBin *binSparse, SparseBucket *bckInsert,
+				  ulong location, int *pfOverwrite)
+{
+   SparseBucket *bckPlace;
+   HTOffset offset;
+
+   bckPlace = SparseFind(binSparse, location);
+   if ( bckPlace )                /* means we replace old contents */
+   {
+      if ( *pfOverwrite )
+	 *bckPlace = *bckInsert;
+      *pfOverwrite = 1;
+      return bckPlace;
+   }
+
+   binSparse += (location >> LOG_LOW_BIN_SIZE);
+   offset = SPARSE_POS_TO_OFFSET(binSparse->bmOccupied,
+				 MOD2(location, LOG_LOW_BIN_SIZE));
+   binSparse->binSparse = (SparseBucket *) 
+      HTsrealloc(binSparse->binSparse,
+		 sizeof(*binSparse->binSparse) * ++binSparse->cOccupied,
+		 sizeof(*binSparse->binSparse));
+   memmove(binSparse->binSparse + offset+1,
+	   binSparse->binSparse + offset,
+	   (binSparse->cOccupied-1 - offset) * sizeof(*binSparse->binSparse));
+   binSparse->binSparse[offset] = *bckInsert;
+   SET_BITMAP(binSparse->bmOccupied, MOD2(location, LOG_LOW_BIN_SIZE));
+   *pfOverwrite = 0;
+   return binSparse->binSparse + offset;
+}
+
+/*************************************************************************\
+| SparseFirstBucket()                                                     |
+| SparseNextBucket()                                                      |
+| SparseCurrentBit()                                                      |
+|     Iterate through the occupied buckets of a dense hashtable.  You     |
+|     must, of course, have allocated space yourself for the iterator.    |
+\*************************************************************************/
+
+static SparseBucket *SparseNextBucket(SparseIterator *iter)
+{
+   if ( iter->posOffset != -1 &&      /* not called from FirstBucket()? */
+        (++iter->posOffset < iter->binSparse[iter->posGroup].cOccupied) )
+      return iter->binSparse[iter->posGroup].binSparse + iter->posOffset;
+
+   iter->posOffset = 0;                         /* start the next group */
+   for ( iter->posGroup++;  iter->posGroup < SPARSE_GROUPS(iter->cBuckets);
+	 iter->posGroup++ )
+      if ( iter->binSparse[iter->posGroup].cOccupied > 0 )
+	 return iter->binSparse[iter->posGroup].binSparse; /* + 0 */
+   return NULL;                      /* all remaining groups were empty */
+}
+
+static SparseBucket *SparseFirstBucket(SparseIterator *iter,
+				       SparseBin *binSparse, ulong cBuckets)
+{
+   iter->binSparse = binSparse;        /* set it up for NextBucket() */
+   iter->cBuckets = cBuckets;
+   iter->posOffset = -1;               /* when we advance, we're at 0 */
+   iter->posGroup = -1;
+   return SparseNextBucket(iter);
+}
+
+/*************************************************************************\
+| SparseWrite()                                                           |
+| SparseRead()                                                            |
+|     These are routines for storing a sparse hashtable onto disk.  We    |
+|     store the number of buckets and a bitmap indicating which buckets   |
+|     are allocated (occupied).  The actual contents of the buckets       |
+|     must be stored separately.                                          |
+\*************************************************************************/
+
+static void SparseWrite(FILE *fp, SparseBin *binSparse, ulong cBuckets)
+{
+   ulong i, j;
+
+   WRITE_UL(fp, cBuckets);
+   for ( i = 0; i < SPARSE_GROUPS(cBuckets); i++ )
+      for ( j = 0; j < (1<<LOG_BM_WORDS); j++ )
+	 WRITE_UL(fp, binSparse[i].bmOccupied[j]);
+}
+
+static ulong SparseRead(FILE *fp, SparseBin **pbinSparse)
+{
+   ulong i, j, cBuckets;
+
+   READ_UL(fp, cBuckets);                /* actually, cBuckets is stored */
+   cBuckets = SparseAllocate(pbinSparse, cBuckets);
+   for ( i = 0; i < SPARSE_GROUPS(cBuckets); i++ )
+   {
+      for ( j = 0; j < (1<<LOG_BM_WORDS); j++ )
+	 READ_UL(fp, (*pbinSparse)[i].bmOccupied[j]);
+      (*pbinSparse)[i].cOccupied =
+	 SPARSE_POS_TO_OFFSET((*pbinSparse)[i].bmOccupied,1<<LOG_LOW_BIN_SIZE);
+      (*pbinSparse)[i].binSparse =
+	 (SparseBucket *) HTsmalloc(sizeof(*((*pbinSparse)[i].binSparse)) *
+				    (*pbinSparse)[i].cOccupied);
+   }
+   return cBuckets;
+}
+
+/*************************************************************************\
+| SparseMemory()                                                          |
+|     SparseMemory() tells us how much memory is being allocated for      |
+|     the dense table.  You need to tell me not only how many buckets     |
+|     there are, but how many are occupied.                               |
+\*************************************************************************/
+
+static ulong SparseMemory(ulong cBuckets, ulong cOccupied)
+{
+   return ( cOccupied * sizeof(SparseBucket) +
+	    SPARSE_GROUPS(cBuckets) * sizeof(SparseBin) );
+}
+
+
+/*  Just for fun, I also provide support for dense tables.  These are
+ *  just regulr arrays.  Access is fast, but they can get big.
+ *  Use Table(x) at the top of chash.h to decide which you want.
+ *  A disadvantage is we need to steal more of the data space for
+ *  indicating empty buckets.  We choose -3.
+ */
+
+#ifndef DenseBucket             /* by default, each bucket holds an HTItem */
+#define DenseBucket             HTItem
+#endif
+
+typedef struct DenseBin {       /* needs to be a struct for C typing reasons */
+   DenseBucket *rgBuckets;      /* A bin is an array of buckets */
+} DenseBin;
+
+typedef struct DenseIterator {
+   long pos;               /* the actual iterator */
+   DenseBin *bin;          /* state info, to avoid args for NextBucket() */
+   ulong cBuckets;
+} DenseIterator;
+
+#define DENSE_IS_EMPTY(bin, i)     ( (bin)[i].data == EMPTY )
+#define DENSE_SET_EMPTY(bin, i)    (bin)[i].data = EMPTY      /* fks-hash.h */
+#define DENSE_SET_OCCUPIED(bin, i) (bin)[i].data = 1          /* not EMPTY */
+
+static void DenseClear(DenseBin *bin, ulong cBuckets)
+{
+   while ( cBuckets-- )
+      DENSE_SET_EMPTY(bin->rgBuckets, cBuckets);
+}
+
+static ulong DenseAllocate(DenseBin **pbin, ulong cBuckets)
+{
+   *pbin = (DenseBin *) HTsmalloc(sizeof(*pbin));
+   (*pbin)->rgBuckets = (DenseBucket *) HTsmalloc(sizeof(*(*pbin)->rgBuckets)
+						  * cBuckets);
+   DenseClear(*pbin, cBuckets);
+   return cBuckets;
+}
+
+static DenseBin *DenseFree(DenseBin *bin, ulong cBuckets)
+{
+   HTfree(bin->rgBuckets, sizeof(*bin->rgBuckets) * cBuckets);
+   HTfree(bin, sizeof(*bin));
+   return NULL;
+}
+
+static int DenseIsEmpty(DenseBin *bin, ulong location)
+{
+   return DENSE_IS_EMPTY(bin->rgBuckets, location);
+}
+
+static DenseBucket *DenseFind(DenseBin *bin, ulong location)
+{
+   if ( DenseIsEmpty(bin, location) )
+      return NULL;
+   return bin->rgBuckets + location;
+}
+
+static DenseBucket *DenseInsert(DenseBin *bin, DenseBucket *bckInsert,
+				ulong location, int *pfOverwrite)
+{
+   DenseBucket *bckPlace;
+
+   bckPlace = DenseFind(bin, location);
+   if ( bckPlace )                /* means something is already there */
+   {
+      if ( *pfOverwrite )
+	 *bckPlace = *bckInsert;
+      *pfOverwrite = 1;           /* set to 1 to indicate someone was there */
+      return bckPlace;
+   }
+   else
+   {
+      bin->rgBuckets[location] = *bckInsert;
+      *pfOverwrite = 0;
+      return bin->rgBuckets + location;
+   }
+}
+
+static DenseBucket *DenseNextBucket(DenseIterator *iter)
+{
+   for ( iter->pos++; iter->pos < iter->cBuckets; iter->pos++ )
+      if ( !DenseIsEmpty(iter->bin, iter->pos) )
+	 return iter->bin->rgBuckets + iter->pos;
+   return NULL;                        /* all remaining groups were empty */
+}
+
+static DenseBucket *DenseFirstBucket(DenseIterator *iter,
+				     DenseBin *bin, ulong cBuckets)
+{
+   iter->bin = bin;                    /* set it up for NextBucket() */
+   iter->cBuckets = cBuckets;
+   iter->pos = -1;                     /* thus the next bucket will be 0 */
+   return DenseNextBucket(iter);
+}
+
+static void DenseWrite(FILE *fp, DenseBin *bin, ulong cBuckets)
+{
+   ulong pos = 0, bit, bm;
+
+   WRITE_UL(fp, cBuckets);
+   while ( pos < cBuckets )
+   {
+      bm = 0;
+      for ( bit = 0; bit < 8*sizeof(ulong); bit++ )
+      {
+	 if ( !DenseIsEmpty(bin, pos) )
+	    SET_BITMAP(&bm, bit);                /* in fks-hash.h */
+	 if ( ++pos == cBuckets )
+	    break;
+      }
+      WRITE_UL(fp, bm);
+   }
+}
+
+static ulong DenseRead(FILE *fp, DenseBin **pbin)
+{
+   ulong pos = 0, bit, bm, cBuckets;
+
+   READ_UL(fp, cBuckets);
+   cBuckets = DenseAllocate(pbin, cBuckets);
+   while ( pos < cBuckets )
+   {
+      READ_UL(fp, bm);
+      for ( bit = 0; bit < 8*sizeof(ulong); bit++ )
+      {
+	 if ( TEST_BITMAP(&bm, bit) )            /* in fks-hash.h */
+	    DENSE_SET_OCCUPIED((*pbin)->rgBuckets, pos);
+	 else
+	    DENSE_SET_EMPTY((*pbin)->rgBuckets, pos);
+	 if ( ++pos == cBuckets )
+	    break;
+      }
+   }
+   return cBuckets;
+}
+
+static ulong DenseMemory(ulong cBuckets, ulong cOccupied)
+{
+   return cBuckets * sizeof(DenseBucket);
+}
+
+
+/* ======================================================================== */
+/*                          HASHING ROUTINES                                */
+/*                       ----------------------                             */
+
+/*  Implements a simple quadratic hashing scheme.  We have a single hash
+ *  table of size t and a single hash function h(x).  When inserting an
+ *  item, first we try h(x) % t.  If it's occupied, we try h(x) + 
+ *  i*(i-1)/2 % t for increasing values of i until we hit a not-occupied
+ *  space.  To make this dynamic, we double the size of the hash table as
+ *  soon as more than half the cells are occupied.  When deleting, we can
+ *  choose to shrink the hashtable when less than a quarter of the
+ *  cells are occupied, or we can choose never to shrink the hashtable.
+ *  For lookup, we check h(x) + i*(i-1)/2 % t (starting with i=0) until
+ *  we get a match or we hit an empty space.  Note that as a result,
+ *  we can't make a cell empty on deletion, or lookups may end prematurely.
+ *  Instead we mark the cell as "deleted."  We thus steal the value
+ *  DELETED as a possible "data" value.  As long as data are pointers,
+ *  that's ok.
+ *     The hash increment we use, i(i-1)/2, is not the standard quadratic
+ *  hash increment, which is i^2.  i(i-1)/2 covers the entire bucket space
+ *  when the hashtable size is a power of two, as it is for us.  In fact,
+ *  the first n probes cover n distinct buckets; then it repeats.  This
+ *  guarantees insertion will always succeed.
+ *     If you linear hashing, set JUMP in chash.h.  You can also change
+ *  various other parameters there.
+ */
+
+/*************************************************************************\
+| Hash()                                                                  |
+|     The hash function I use is due to Bob Jenkins (see                  |
+|     http://ourworld.compuserve.com/homepages/bob_jenkins/evahash.htm).  |
+|     It takes 36 instructions, in 18 cycles if you're lucky.             |
+|        hashing depends on the fact the hashtable size is always a       |
+|     power of 2.  cBuckets is probably ht->cBuckets.                     |
+\*************************************************************************/
+
+#if LOG_WORD_SIZE == 5                      /* 32 bit words */
+
+#define mix(a,b,c) \
+{ \
+  a -= b; a -= c; a ^= (c>>13); \
+  b -= c; b -= a; b ^= (a<<8); \
+  c -= a; c -= b; c ^= (b>>13); \
+  a -= b; a -= c; a ^= (c>>12);  \
+  b -= c; b -= a; b ^= (a<<16); \
+  c -= a; c -= b; c ^= (b>>5); \
+  a -= b; a -= c; a ^= (c>>3);  \
+  b -= c; b -= a; b ^= (a<<10); \
+  c -= a; c -= b; c ^= (b>>15); \
+}
+#ifdef WORD_HASH                 /* play with this on little-endian machines */
+#define WORD_AT(ptr)    ( *(ulong *)(ptr) )
+#else
+#define WORD_AT(ptr)    ( (ptr)[0] + ((ulong)(ptr)[1]<<8) + \
+			  ((ulong)(ptr)[2]<<16) + ((ulong)(ptr)[3]<<24) )
+#endif
+
+#elif LOG_WORD_SIZE == 6        /* 64 bit words */
+
+#define mix(a,b,c) \
+{ \
+  a -= b; a -= c; a ^= (c>>43); \
+  b -= c; b -= a; b ^= (a<<9); \
+  c -= a; c -= b; c ^= (b>>8); \
+  a -= b; a -= c; a ^= (c>>38); \
+  b -= c; b -= a; b ^= (a<<23); \
+  c -= a; c -= b; c ^= (b>>5); \
+  a -= b; a -= c; a ^= (c>>35); \
+  b -= c; b -= a; b ^= (a<<49); \
+  c -= a; c -= b; c ^= (b>>11); \
+  a -= b; a -= c; a ^= (c>>12); \
+  b -= c; b -= a; b ^= (a<<18); \
+  c -= a; c -= b; c ^= (b>>22); \
+}
+#ifdef WORD_HASH                 /* alpha is little-endian, btw */
+#define WORD_AT(ptr)    ( *(ulong *)(ptr) )
+#else
+#define WORD_AT(ptr)    ( (ptr)[0] + ((ulong)(ptr)[1]<<8) + \
+			  ((ulong)(ptr)[2]<<16) + ((ulong)(ptr)[3]<<24) + \
+			  ((ulong)(ptr)[4]<<32) + ((ulong)(ptr)[5]<<40) + \
+			  ((ulong)(ptr)[6]<<48) + ((ulong)(ptr)[7]<<56) )
+#endif
+
+#else                            /* neither 32 or 64 bit words */
+#error This hash function can only hash 32 or 64 bit words.  Sorry.
+#endif
+
+static ulong Hash(HashTable *ht, char *key, ulong cBuckets)
+{
+   ulong a, b, c, cchKey, cchKeyOrig;
+
+   cchKeyOrig = ht->cchKey == NULL_TERMINATED ? strlen(key) : ht->cchKey;
+   a = b = c = 0x9e3779b9;       /* the golden ratio; an arbitrary value */
+
+   for ( cchKey = cchKeyOrig;  cchKey >= 3 * sizeof(ulong);
+	 cchKey -= 3 * sizeof(ulong),  key += 3 * sizeof(ulong) )
+   {
+      a += WORD_AT(key);
+      b += WORD_AT(key + sizeof(ulong));
+      c += WORD_AT(key + sizeof(ulong)*2);
+      mix(a,b,c);
+   }
+
+   c += cchKeyOrig;
+   switch ( cchKey ) {           /* deal with rest.  Cases fall through */
+#if LOG_WORD_SIZE == 5
+      case 11: c += (ulong)key[10]<<24;
+      case 10: c += (ulong)key[9]<<16;
+      case 9 : c += (ulong)key[8]<<8;
+               /* the first byte of c is reserved for the length */
+      case 8 : b += WORD_AT(key+4);  a+= WORD_AT(key);  break;
+      case 7 : b += (ulong)key[6]<<16;
+      case 6 : b += (ulong)key[5]<<8;
+      case 5 : b += key[4];
+      case 4 : a += WORD_AT(key);  break;
+      case 3 : a += (ulong)key[2]<<16;
+      case 2 : a += (ulong)key[1]<<8;
+      case 1 : a += key[0];
+   /* case 0 : nothing left to add */
+#elif LOG_WORD_SIZE == 6
+      case 23: c += (ulong)key[22]<<56;
+      case 22: c += (ulong)key[21]<<48;
+      case 21: c += (ulong)key[20]<<40;
+      case 20: c += (ulong)key[19]<<32;
+      case 19: c += (ulong)key[18]<<24;
+      case 18: c += (ulong)key[17]<<16;
+      case 17: c += (ulong)key[16]<<8;
+               /* the first byte of c is reserved for the length */
+      case 16: b += WORD_AT(key+8);  a+= WORD_AT(key);  break;
+      case 15: b += (ulong)key[14]<<48;
+      case 14: b += (ulong)key[13]<<40;
+      case 13: b += (ulong)key[12]<<32;
+      case 12: b += (ulong)key[11]<<24;
+      case 11: b += (ulong)key[10]<<16;
+      case 10: b += (ulong)key[ 9]<<8;
+      case  9: b += (ulong)key[ 8];
+      case  8: a += WORD_AT(key);  break;
+      case  7: a += (ulong)key[ 6]<<48;
+      case  6: a += (ulong)key[ 5]<<40;
+      case  5: a += (ulong)key[ 4]<<32;
+      case  4: a += (ulong)key[ 3]<<24;
+      case  3: a += (ulong)key[ 2]<<16;
+      case  2: a += (ulong)key[ 1]<<8;
+      case  1: a += (ulong)key[ 0];
+   /* case 0: nothing left to add */
+#endif
+   }
+   mix(a,b,c);
+   return c & (cBuckets-1);
+}
+
+
+/*************************************************************************\
+| Rehash()                                                                |
+|     You give me a hashtable, a new size, and a bucket to follow, and    |
+|     I resize the hashtable's bin to be the new size, rehashing          |
+|     everything in it.  I keep particular track of the bucket you pass   |
+|     in, and RETURN a pointer to where the item in the bucket got to.    |
+|     (If you pass in NULL, I return an arbitrary pointer.)               |
+\*************************************************************************/
+
+static HTItem *Rehash(HashTable *ht, ulong cNewBuckets, HTItem *bckWatch)
+{
+   Table *tableNew;
+   ulong iBucketFirst;
+   HTItem *bck, *bckNew = NULL;
+   ulong offset;                         /* the i in h(x) + i*(i-1)/2 */
+   int fOverwrite = 0;    /* not an issue: there can be no collisions */
+
+   assert( ht->table );
+   cNewBuckets = Table(Allocate)(&tableNew, cNewBuckets);
+      /* Since we RETURN the new position of bckWatch, we want  *
+       * to make sure it doesn't get moved due to some table    *
+       * rehashing that comes after it's inserted.  Thus, we    *
+       * have to put it in last.  This makes the loop weird.    */
+   for ( bck = HashFirstBucket(ht); ; bck = HashNextBucket(ht) )
+   {
+      if ( bck == NULL )      /* we're done iterating, so look at bckWatch */
+      {
+	 bck = bckWatch;
+	 if ( bck == NULL )           /* I guess bckWatch wasn't specified */
+	    break;
+      }
+      else if ( bck == bckWatch )
+	 continue;             /* ignore if we see it during the iteration */
+
+      offset = 0;                              /* a new i for a new bucket */
+      for ( iBucketFirst = Hash(ht, KEY_PTR(ht, bck->key), cNewBuckets);
+	    !Table(IsEmpty)(tableNew, iBucketFirst);
+	    iBucketFirst = (iBucketFirst + JUMP(KEY_PTR(ht,bck->key), offset))
+	                   & (cNewBuckets-1) )
+	 ;
+      bckNew = Table(Insert)(tableNew, bck, iBucketFirst, &fOverwrite);
+      if ( bck == bckWatch )       /* we're done with the last thing to do */
+	 break;
+   }
+   Table(Free)(ht->table, ht->cBuckets);
+   ht->table = tableNew;
+   ht->cBuckets = cNewBuckets;
+   ht->cDeletedItems = 0;
+   return bckNew;     /* new position of bckWatch, which was inserted last */
+}
+
+/*************************************************************************\
+| Find()                                                                  |
+|     Does the quadratic searching stuff.  RETURNS NULL if we don't       |
+|     find an object with the given key, and a pointer to the Item        |
+|     holding the key, if we do.  Also sets posLastFind.  If piEmpty is   |
+|     non-NULL, we set it to the first open bucket we pass; helpful for   |
+|     doing a later insert if the search fails, for instance.             |
+\*************************************************************************/
+
+static HTItem *Find(HashTable *ht, ulong key, ulong *piEmpty)
+{
+   ulong iBucketFirst;
+   HTItem *item;
+   ulong offset = 0;              /* the i in h(x) + i*(i-1)/2 */
+   int fFoundEmpty = 0;           /* set when we pass over an empty bucket */
+
+   ht->posLastFind = NULL;        /* set up for failure: a new find starts */
+   if ( ht->table == NULL )       /* empty hash table: find is bound to fail */
+      return NULL;
+
+   iBucketFirst = Hash(ht, KEY_PTR(ht, key), ht->cBuckets);
+   while ( 1 )                    /* now try all i > 0 */
+   {
+      item = Table(Find)(ht->table, iBucketFirst);
+      if ( item == NULL )         /* it's not in the table */
+      {
+	 if ( piEmpty && !fFoundEmpty ) *piEmpty = iBucketFirst;
+	 return NULL;
+      }
+      else
+      {
+	 if ( IS_BCK_DELETED(item) )      /* always 0 ifdef INSERT_ONLY */
+	 {
+	    if ( piEmpty && !fFoundEmpty )
+	    {
+	       *piEmpty = iBucketFirst;
+	       fFoundEmpty = 1;
+	    }
+	 } else
+	    if ( !KEY_CMP(ht, key, item->key) )     /* must be occupied */
+	    {
+	       ht->posLastFind = item;
+	       return item;               /* we found it! */
+	    }
+      }
+      iBucketFirst = ((iBucketFirst + JUMP(KEY_PTR(ht, key), offset))
+		      & (ht->cBuckets-1));
+   }
+}
+
+/*************************************************************************\
+| Insert()                                                                |
+|     If an item with the key already exists in the hashtable, RETURNS    |
+|     a pointer to the item (replacing its data if fOverwrite is 1).      |
+|     If not, we find the first place-to-insert (which Find() is nice     |
+|     enough to set for us) and insert the item there, RETURNing a        |
+|     pointer to the item.  We might grow the hashtable if it's getting   |
+|     full.  Note we include buckets holding DELETED when determining     |
+|     fullness, because they slow down searching.                         |
+\*************************************************************************/
+
+static ulong NextPow2(ulong x)    /* returns next power of 2 > x, or 2^31 */
+{
+   if ( ((x << 1) >> 1) != x )    /* next power of 2 overflows */
+      x >>= 1;                    /* so we return highest power of 2 we can */
+   while ( (x & (x-1)) != 0 )     /* blacks out all but the top bit */
+      x &= (x-1);
+   return x << 1;                 /* makes it the *next* power of 2 */
+}
+
+static HTItem *Insert(HashTable *ht, ulong key, ulong data, int fOverwrite)
+{
+   HTItem *item, bckInsert;
+   ulong iEmpty;                  /* first empty bucket key probes */
+
+   if ( ht->table == NULL )       /* empty hash table: find is bound to fail */
+      return NULL;
+   item = Find(ht, key, &iEmpty);
+   ht->posLastFind = NULL;        /* last operation is insert, not find */
+   if ( item )
+   {
+      if ( fOverwrite )
+	 item->data = data;       /* key already matches */
+      return item;
+   }
+
+   COPY_KEY(ht, bckInsert.key, key);    /* make our own copy of the key */
+   bckInsert.data = data;               /* oh, and the data too */
+   item = Table(Insert)(ht->table, &bckInsert, iEmpty, &fOverwrite);
+   if ( fOverwrite )                    /* we overwrote a deleted bucket */
+      ht->cDeletedItems--;
+   ht->cItems++;                        /* insert couldn't have overwritten */
+   if ( ht->cDeltaGoalSize > 0 )  /* closer to our goal size */
+      ht->cDeltaGoalSize--;
+   if ( ht->cItems + ht->cDeletedItems >= ht->cBuckets * OCCUPANCY_PCT
+        || ht->cDeltaGoalSize < 0 ) /* we must've overestimated # of deletes */
+      item = Rehash(ht, 
+		    NextPow2((ulong)(((ht->cDeltaGoalSize > 0 ?
+				       ht->cDeltaGoalSize : 0)
+				      + ht->cItems) / OCCUPANCY_PCT)),
+		    item);
+   return item;
+}
+
+/*************************************************************************\
+| Delete()                                                                |
+|     Removes the item from the hashtable, and if fShrink is 1, will      |
+|     shrink the hashtable if it's too small (ie even after halving,      |
+|     the ht would be less than half full, though in order to avoid       |
+|     oscillating table size, we insist that after halving the ht would   |
+|     be less than 40% full).  RETURNS 1 if the item was found, 0 else.   |
+|        If fLastFindSet is true, then this function is basically         |
+|     DeleteLastFind.                                                     |
+\*************************************************************************/
+
+static int Delete(HashTable *ht, ulong key, int fShrink, int fLastFindSet)
+{
+   if ( !fLastFindSet && !Find(ht, key, NULL) )
+      return 0;
+   SET_BCK_DELETED(ht, ht->posLastFind);       /* find set this, how nice */
+   ht->cItems--; 
+   ht->cDeletedItems++;
+   if ( ht->cDeltaGoalSize < 0 )  /* heading towards our goal of deletion */
+      ht->cDeltaGoalSize++;
+
+   if ( fShrink && ht->cItems < ht->cBuckets * OCCUPANCY_PCT*0.4 
+        && ht->cDeltaGoalSize >= 0       /* wait until we're done deleting */
+        && (ht->cBuckets >> 1) >= MIN_HASH_SIZE )                /* shrink */
+      Rehash(ht,
+	     NextPow2((ulong)((ht->cItems+ht->cDeltaGoalSize)/OCCUPANCY_PCT)),
+	     NULL);
+   ht->posLastFind = NULL;           /* last operation is delete, not find */
+   return 1;
+}
+
+
+/* ======================================================================== */
+/*                          USER-VISIBLE API                                */
+/*                       ----------------------                             */
+
+/*************************************************************************\
+| AllocateHashTable()                                                     |
+| ClearHashTable()                                                        |
+| FreeHashTable()                                                         |
+|     Allocate() allocates a hash table and sets up size parameters.      |
+|     Free() frees it.  Clear() deletes all the items from the hash       |
+|     table, but frees not.                                               |
+|        cchKey is < 0 if the keys you send me are meant to be pointers   |
+|     to \0-terminated strings.  Then -cchKey is the maximum key size.    |
+|     If cchKey < one word (ulong), the keys you send me are the keys     |
+|     themselves; else the keys you send me are pointers to the data.     |
+|        If fSaveKeys is 1, we copy any keys given to us to insert.  We   |
+|     also free these keys when freeing the hash table.  If it's 0, the   |
+|     user is responsible for key space management.                       |
+|        AllocateHashTable() RETURNS a hash table; the others TAKE one.   |
+\*************************************************************************/
+
+HashTable *AllocateHashTable(int cchKey, int fSaveKeys)
+{
+   HashTable *ht;
+
+   ht = (HashTable *) HTsmalloc(sizeof(*ht));   /* set everything to 0 */
+   ht->cBuckets = Table(Allocate)(&ht->table, MIN_HASH_SIZE);
+   ht->cchKey = cchKey <= 0 ? NULL_TERMINATED : cchKey;
+   ht->cItems = 0;
+   ht->cDeletedItems = 0;
+   ht->fSaveKeys = fSaveKeys;
+   ht->cDeltaGoalSize = 0;
+   ht->iter = HTsmalloc( sizeof(TableIterator) );
+
+   ht->fpData = NULL;                           /* set by HashLoad, maybe */
+   ht->bckData.data = (ulong) NULL;             /* this must be done */
+   HTSetupKeyTrunc();                           /* in util.c */
+   return ht;
+}
+
+void ClearHashTable(HashTable *ht)
+{
+   HTItem *bck;
+
+   if ( STORES_PTR(ht) && ht->fSaveKeys )       /* need to free keys */
+      for ( bck = HashFirstBucket(ht); bck; bck = HashNextBucket(ht) )
+      {
+	 FREE_KEY(ht, bck->key);
+	 if ( ht->fSaveKeys == 2 )  /* this means key stored in one block */
+	    break;                  /* ...so only free once */
+      }
+   Table(Free)(ht->table, ht->cBuckets);
+   ht->cBuckets = Table(Allocate)(&ht->table, MIN_HASH_SIZE);
+
+   ht->cItems = 0;
+   ht->cDeletedItems = 0;
+   ht->cDeltaGoalSize = 0;
+   ht->posLastFind = NULL;
+   ht->fpData = NULL;               /* no longer HashLoading */
+   if ( ht->bckData.data )  free( (char *)(ht)->bckData.data);
+   ht->bckData.data = (ulong) NULL;
+}
+
+void FreeHashTable(HashTable *ht)
+{
+   ClearHashTable(ht);
+   if ( ht->iter )    HTfree(ht->iter, sizeof(TableIterator));
+   if ( ht->table )   Table(Free)(ht->table, ht->cBuckets);
+   free(ht);
+}
+
+/*************************************************************************\
+| HashFind()                                                              |
+| HashFindLast()                                                          |
+|     HashFind(): looks in h(x) + i(i-1)/2 % t as i goes up from 0        |
+|     until we either find the key or hit an empty bucket.  RETURNS a     |
+|     pointer to the item in the hit bucket, if we find it, else          |
+|     RETURNS NULL.                                                       |
+|        HashFindLast() returns the item returned by the last             |
+|     HashFind(), which may be NULL if the last HashFind() failed.        |
+|        LOAD_AND_RETURN reads the data from off disk, if necessary.      |
+\*************************************************************************/
+
+HTItem *HashFind(HashTable *ht, ulong key)
+{
+   LOAD_AND_RETURN(ht, Find(ht, KEY_TRUNC(ht, key), NULL));
+}
+
+HTItem *HashFindLast(HashTable *ht)
+{
+   LOAD_AND_RETURN(ht, ht->posLastFind);
+}
+
+/*************************************************************************\
+| HashFindOrInsert()                                                      |
+| HashFindOrInsertItem()                                                  |
+| HashInsert()                                                            |
+| HashInsertItem()                                                        |
+| HashDelete()                                                            |
+| HashDeleteLast()                                                        |
+|     Pretty obvious what these guys do.  Some take buckets (items),      |
+|     some take keys and data separately.  All things RETURN the bucket   |
+|     (a pointer into the hashtable) if appropriate.                      |
+\*************************************************************************/
+
+HTItem *HashFindOrInsert(HashTable *ht, ulong key, ulong dataInsert)
+{
+      /* This is equivalent to Insert without samekey-overwrite */
+   return Insert(ht, KEY_TRUNC(ht, key), dataInsert, 0);
+}
+
+HTItem *HashFindOrInsertItem(HashTable *ht, HTItem *pItem)
+{
+   return HashFindOrInsert(ht, pItem->key, pItem->data);
+}
+
+HTItem *HashInsert(HashTable *ht, ulong key, ulong data)
+{
+   return Insert(ht, KEY_TRUNC(ht, key), data, SAMEKEY_OVERWRITE);
+}
+
+HTItem *HashInsertItem(HashTable *ht, HTItem *pItem)
+{
+   return HashInsert(ht, pItem->key, pItem->data);
+}
+
+int HashDelete(HashTable *ht, ulong key)
+{
+   return Delete(ht, KEY_TRUNC(ht, key), !FAST_DELETE, 0);
+}
+
+int HashDeleteLast(HashTable *ht)
+{
+   if ( !ht->posLastFind  )                /* last find failed */
+      return 0;
+   return Delete(ht, 0, !FAST_DELETE, 1);  /* no need to specify a key */
+}
+
+/*************************************************************************\
+| HashFirstBucket()                                                       |
+| HashNextBucket()                                                        |
+|     Iterates through the items in the hashtable by iterating through    |
+|     the table.  Since we know about deleted buckets and loading data    |
+|     off disk, and the table doesn't, our job is to take care of these   |
+|     things.  RETURNS a bucket, or NULL after the last bucket.           |
+\*************************************************************************/
+
+HTItem *HashFirstBucket(HashTable *ht)
+{
+   HTItem *retval;
+
+   for ( retval = Table(FirstBucket)(ht->iter, ht->table, ht->cBuckets);
+	 retval;  retval = Table(NextBucket)(ht->iter) )
+      if ( !IS_BCK_DELETED(retval) )
+	 LOAD_AND_RETURN(ht, retval);
+   return NULL;
+}
+
+HTItem *HashNextBucket(HashTable *ht)
+{
+   HTItem *retval;
+
+   while ( (retval=Table(NextBucket)(ht->iter)) )
+      if ( !IS_BCK_DELETED(retval) )
+	 LOAD_AND_RETURN(ht, retval);
+   return NULL;
+}
+
+/*************************************************************************\
+| HashSetDeltaGoalSize()                                                  |
+|     If we're going to insert 100 items, set the delta goal size to      |
+|     100 and we take that into account when inserting.  Likewise, if     |
+|     we're going to delete 10 items, set it to -100 and we won't         |
+|     rehash until all 100 have been done.  It's ok to be wrong, but      |
+|     it's efficient to be right.  Returns the delta value.               |
+\*************************************************************************/
+
+int HashSetDeltaGoalSize(HashTable *ht, int delta)
+{
+   ht->cDeltaGoalSize = delta;
+#if FAST_DELETE == 1 || defined INSERT_ONLY
+   if ( ht->cDeltaGoalSize < 0 )   /* for fast delete, we never */
+      ht->cDeltaGoalSize = 0;      /* ...rehash after deletion  */
+#endif
+   return ht->cDeltaGoalSize;
+}
+
+
+/*************************************************************************\
+| HashSave()                                                              |
+| HashLoad()                                                              |
+| HashLoadKeys()                                                          |
+|     Routines for saving and loading the hashtable from disk.  We can    |
+|     then use the hashtable in two ways: loading it back into memory     |
+|     (HashLoad()) or loading only the keys into memory, in which case    |
+|     the data for a given key is loaded off disk when the key is         |
+|     retrieved.  The data is freed when something new is retrieved in    |
+|     its place, so this is not a "lazy-load" scheme.                     |
+|        The key is saved automatically and restored upon load, but the   |
+|     user needs to specify a routine for reading and writing the data.   |
+|     fSaveKeys is of course set to 1 when you read in a hashtable.       |
+|     HashLoad RETURNS a newly allocated hashtable.                       |
+|        DATA_WRITE() takes an fp and a char * (representing the data     |
+|     field), and must perform two separate tasks.  If fp is NULL,        |
+|     return the number of bytes written.  If not, writes the data to     |
+|     disk at the place the fp points to.                                 |
+|        DATA_READ() takes an fp and the number of bytes in the data      |
+|     field, and returns a char * which points to wherever you've         |
+|     written the data.  Thus, you must allocate memory for the data.     |
+|        Both dataRead and dataWrite may be NULL if you just wish to      |
+|     store the data field directly, as an integer.                       |
+\*************************************************************************/
+
+void HashSave(FILE *fp, HashTable *ht, int (*dataWrite)(FILE *, char *))
+{
+   long cchData, posStart;
+   HTItem *bck;
+
+   /* File format: magic number (4 bytes)
+                 : cchKey (one word)
+                 : cItems (one word)
+                 : cDeletedItems (one word)
+                 : table info (buckets and a bitmap)
+		 : cchAllKeys (one word)
+      Then the keys, in a block.  If cchKey is NULL_TERMINATED, the keys
+      are null-terminated too, otherwise this takes up cchKey*cItems bytes.
+      Note that keys are not written for DELETED buckets.
+      Then the data:
+                 : EITHER DELETED (one word) to indicate it's a deleted bucket,
+                 : OR number of bytes for this (non-empty) bucket's data
+                   (one word).  This is not stored if dataWrite == NULL
+                   since the size is known to be sizeof(ul).  Plus:
+                 : the data for this bucket (variable length)
+      All words are in network byte order. */
+
+   fprintf(fp, "%s", MAGIC_KEY);
+   WRITE_UL(fp, ht->cchKey);        /* WRITE_UL, READ_UL, etc in fks-hash.h */
+   WRITE_UL(fp, ht->cItems);
+   WRITE_UL(fp, ht->cDeletedItems);
+   Table(Write)(fp, ht->table, ht->cBuckets);        /* writes cBuckets too */
+
+   WRITE_UL(fp, 0);                 /* to be replaced with sizeof(key block) */
+   posStart = ftell(fp);
+   for ( bck = HashFirstBucket(ht); bck; bck = HashNextBucket(ht) )
+      fwrite(KEY_PTR(ht, bck->key), 1,
+	     (ht->cchKey == NULL_TERMINATED ?
+	      strlen(KEY_PTR(ht, bck->key))+1 : ht->cchKey), fp);
+   cchData = ftell(fp) - posStart;
+   fseek(fp, posStart - sizeof(unsigned long), SEEK_SET);
+   WRITE_UL(fp, cchData);
+   fseek(fp, 0, SEEK_END);          /* done with our sojourn at the header */
+
+      /* Unlike HashFirstBucket, TableFirstBucket iters through deleted bcks */
+   for ( bck = Table(FirstBucket)(ht->iter, ht->table, ht->cBuckets);
+	 bck;  bck = Table(NextBucket)(ht->iter) )
+      if ( dataWrite == NULL || IS_BCK_DELETED(bck) )
+	 WRITE_UL(fp, bck->data);
+      else                          /* write cchData followed by the data */
+      {
+	 WRITE_UL(fp, (*dataWrite)(NULL, (char *)bck->data));
+	 (*dataWrite)(fp, (char *)bck->data);
+      }
+}
+
+static HashTable *HashDoLoad(FILE *fp, char * (*dataRead)(FILE *, int), 
+			     HashTable *ht)
+{
+   ulong cchKey;
+   char szMagicKey[4], *rgchKeys;
+   HTItem *bck;
+
+   fread(szMagicKey, 1, 4, fp);
+   if ( strncmp(szMagicKey, MAGIC_KEY, 4) )
+   {
+      fprintf(stderr, "ERROR: not a hash table (magic key is %4.4s, not %s)\n",
+	      szMagicKey, MAGIC_KEY);
+      exit(3);
+   }
+   Table(Free)(ht->table, ht->cBuckets);  /* allocated in AllocateHashTable */
+
+   READ_UL(fp, ht->cchKey);
+   READ_UL(fp, ht->cItems);
+   READ_UL(fp, ht->cDeletedItems);
+   ht->cBuckets = Table(Read)(fp, &ht->table);    /* next is the table info */
+
+   READ_UL(fp, cchKey);
+   rgchKeys = (char *) HTsmalloc( cchKey );  /* stores all the keys */
+   fread(rgchKeys, 1, cchKey, fp);
+      /* We use the table iterator so we don't try to LOAD_AND_RETURN */
+   for ( bck = Table(FirstBucket)(ht->iter, ht->table, ht->cBuckets);
+	 bck;  bck = Table(NextBucket)(ht->iter) )
+   {
+      READ_UL(fp, bck->data);        /* all we need if dataRead is NULL */
+      if ( IS_BCK_DELETED(bck) )     /* always 0 if defined(INSERT_ONLY) */
+	 continue;                   /* this is why we read the data first */
+      if ( dataRead != NULL )        /* if it's null, we're done */
+	 if ( !ht->fpData )          /* load data into memory */
+	    bck->data = (ulong)dataRead(fp, bck->data);
+	 else                        /* store location of data on disk */
+	 {
+	    fseek(fp, bck->data, SEEK_CUR);  /* bck->data held size of data */
+	    bck->data = ftell(fp) - bck->data - sizeof(unsigned long);
+	 }
+
+      if ( ht->cchKey == NULL_TERMINATED )   /* now read the key */
+      {
+	 bck->key = (ulong) rgchKeys;
+	 rgchKeys = strchr(rgchKeys, '\0') + 1;    /* read past the string */
+      }
+      else
+      {
+	 if ( STORES_PTR(ht) )               /* small keys stored directly */
+	    bck->key = (ulong) rgchKeys;
+	 else
+	    memcpy(&bck->key, rgchKeys, ht->cchKey);
+	 rgchKeys += ht->cchKey;
+      }
+   }
+   if ( !STORES_PTR(ht) )                    /* keys are stored directly */
+      HTfree(rgchKeys - cchKey, cchKey);     /* we've advanced rgchK to end */
+   return ht;
+}
+
+HashTable *HashLoad(FILE *fp, char * (*dataRead)(FILE *, int))
+{
+   HashTable *ht;
+   ht = AllocateHashTable(0, 2);  /* cchKey set later, fSaveKey should be 2! */
+   return HashDoLoad(fp, dataRead, ht);
+}
+
+HashTable *HashLoadKeys(FILE *fp, char * (*dataRead)(FILE *, int))
+{
+   HashTable *ht;
+
+   if ( dataRead == NULL )
+      return HashLoad(fp, NULL);  /* no reason not to load the data here */
+   ht = AllocateHashTable(0, 2);  /* cchKey set later, fSaveKey should be 2! */
+   ht->fpData = fp;               /* tells HashDoLoad() to only load keys */
+   ht->dataRead = dataRead;
+   return HashDoLoad(fp, dataRead, ht);
+}
+
+/*************************************************************************\
+| PrintHashTable()                                                        |
+|     A debugging tool.  Prints the entire contents of the hash table,    |
+|     like so: <bin #>: key of the contents.  Returns number of bytes     |
+|     allocated.  If time is not -1, we print it as the time required     |
+|     for the hash.  If iForm is 0, we just print the stats.  If it's     |
+|     1, we print the keys and data too, but the keys are printed as      |
+|     ulongs.  If it's 2, we print the keys correctly (as long numbers    |
+|     or as strings).                                                     |
+\*************************************************************************/
+
+ulong PrintHashTable(HashTable *ht, double time, int iForm)
+{
+   ulong cbData = 0, cbBin = 0, cItems = 0, cOccupied = 0;
+   HTItem *item;
+
+   printf("HASH TABLE.\n");
+   if ( time > -1.0 )
+   {
+      printf("----------\n");
+      printf("Time: %27.2f\n", time);
+   }
+
+   for ( item = Table(FirstBucket)(ht->iter, ht->table, ht->cBuckets);
+	 item;  item = Table(NextBucket)(ht->iter) )
+   {
+      cOccupied++;                    /* this includes deleted buckets */
+      if ( IS_BCK_DELETED(item) )     /* we don't need you for anything else */
+	 continue;
+      cItems++;                       /* this is for a sanity check */
+      if ( STORES_PTR(ht) )
+	 cbData += ht->cchKey == NULL_TERMINATED ? 
+	    WORD_ROUND(strlen((char *)item->key)+1) : ht->cchKey;
+      else
+	 cbBin -= sizeof(item->key), cbData += sizeof(item->key);
+      cbBin -= sizeof(item->data), cbData += sizeof(item->data);
+      if ( iForm != 0 )      /* we want the actual contents */
+      {
+	 if ( iForm == 2 && ht->cchKey == NULL_TERMINATED ) 
+	    printf("%s/%lu\n", (char *)item->key, item->data);
+	 else if ( iForm == 2 && STORES_PTR(ht) )
+	    printf("%.*s/%lu\n", 
+		   (int)ht->cchKey, (char *)item->key, item->data);
+	 else     /* either key actually is a ulong, or iForm == 1 */
+	    printf("%lu/%lu\n", item->key, item->data);
+      }
+   }
+   assert( cItems == ht->cItems );                   /* sanity check */
+   cbBin = Table(Memory)(ht->cBuckets, cOccupied);
+
+   printf("----------\n");   
+   printf("%lu buckets (%lu bytes).  %lu empty.  %lu hold deleted items.\n"
+	  "%lu items (%lu bytes).\n"
+	  "%lu bytes total.  %lu bytes (%2.1f%%) of this is ht overhead.\n",
+	  ht->cBuckets, cbBin, ht->cBuckets - cOccupied, cOccupied - ht->cItems,
+	  ht->cItems, cbData,
+	  cbData + cbBin, cbBin, cbBin*100.0/(cbBin+cbData));
+
+   return cbData + cbBin;
+}
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/README
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/README	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/README	(revision 2162)
@@ -0,0 +1,151 @@
+This directory contains several hash-map implementations, similar in
+API to SGI's hash_map class, but with different performance
+characteristics.  sparse_hash_map uses very little space overhead, 1-2
+bits per entry.  dense_hash_map is very fast, particulary on lookup.
+(sparse_hash_set and dense_hash_set are the set versions of these
+routines.)  On the other hand, these classes have requirements that
+may not make them appropriate for all applications.
+
+All these implementation use a hashtable with internal quadratic
+probing.  This method is space-efficient -- there is no pointer
+overhead -- and time-efficient for good hash functions.
+
+COMPILING
+---------
+To compile test applications with these classes, run ./configure
+followed by make.  To install these header files on your system, run
+'make install'.  See INSTALL for more details.
+
+USING
+-----
+See the html files in the doc directory for small example programs
+that use these classes.  It's enough to just include the header file:
+
+   #include <google/sparse_hash_map> // or sparse_hash_set, dense_hash_map, ...
+   std::sparse_hash_set<int, int> number_mapper;
+
+and use the class the way you would other hash-map implementations.
+(Though see "API" below for caveats.)
+
+By default (you can change it via a flag to ./configure), these hash
+implementations are defined in the std namespace.
+
+API
+---
+The API for sparse_hash_map, dense_hash_map, sparse_hash_set, and
+dense_hash_set, are a superset of the API of SGI's hash_map class.
+See doc/sparse_hash_map.html, et al., for more information about the
+API.
+
+The usage of these classes differ from SGI's hash_map, and other
+hashtable implementations, in the following major ways:
+
+1) dense_hash_map requires you to set aside one key value as the
+   'empty bucket' value, set via the set_empty_key() method.  This
+   *MUST* be called before you can use the dense_hash_map.  It is
+   illegal to insert any elements into a dense_hash_map whose key is
+   equal to the empty-key.
+
+2) For both dense_hash_map and sparse_hash_map, if you wish to delete
+   elements from the hashtable, you must set aside a key value as the
+   'deleted bucket' value, set via the set_deleted_key() method.  If
+   your hash-map is insert-only, there is no need to call this
+   method.  If you call set_deleted_key(), it is illegal to insert any
+   elements into a dense_hash_map or sparse_hash_map whose key is
+   equal to the deleted-key.
+
+3) Both dense_hash_map and sparse_hash_map must take "plain old
+   data" for the key and value.  For keys this is usually true: basic
+   C types and C++ types like string are both acceptable, for
+   instance.  For values, this is often true.  If it is not, consider
+   storing a pointer to the value in the hash-map, rather than the
+   value itself.  This also yields speed improvements, since the
+   hashtable will have less memory to move around when it resizes.
+
+4) These hash-map implementation support I/O.  See below.
+
+There are also some smaller differences:
+
+1) The constructor takes an optional argument that specifies the
+   number of elements you expect to insert into the hashtable.  This
+   differs from SGI's hash_map implementation, which takes an optional
+   number of buckets.
+
+2) erase() does not immediately reclaim memory.  As a consequence,
+   erase() does not invalidate any iterators, making loops like this
+   correct:
+      for (it = ht.begin(); it != ht.end(); ++it)
+        if (...) ht.erase(it);
+   As another consequence, a series of erase() calls can leave your
+   hashtable using more memory than it needs to.  The hashtable will
+   automatically compact() at the next call to insert(), but to
+   manually compact a hashtable, you can call
+      ht.resize(0)
+
+3) While sparse_hash_map et al. accept an Allocator template argument,
+   they ignore it.  They use malloc() and free() for all memory
+   allocations.
+
+4) sparse_hash_map et al. do not use exceptions.
+
+I/O
+---
+In addition to the normal hash-map operations, sparse_hash_map can
+read and write hashtables to disk.  (dense_hash_map also has the API,
+but it has not yet been implemented, and writes will always fail.)
+
+In the simplest case, writing a hashtable is as easy as calling two
+methods on the hashtable:
+   ht.write_metadata(fp);
+   ht.write_nopointer_data(fp);
+
+Reading in this data is equally simple:
+   sparse_hash_map<...> ht;
+   ht.read_metadata(fp);
+   ht.read_nopointer_data(fp);
+
+The above is sufficient if the key and value do not contain any
+pointers: they are basic C types or agglomorations of basic C types.
+If the key and/or value do contain pointers, you can still store the
+hashtable by replacing write_nopointer_data() with a custom writing
+routine.  See sparse_hash_map.html et al. for more information.
+
+SPARSETABLE
+-----------
+In addition to the hash-map and hash-set classes, this package also
+provides sparsetable.h, an array implementation that uses space
+proportional to the number of elements in the array, rather than the
+maximum element index.  It uses very little space overhead: 1 bit per
+entry.  See sparsetable.html for the API.
+
+RESOURCE USAGE
+--------------
+* sparse_hash_map has memory overhead of about 2 bits per hash-map
+  entry.
+* dense_hash_map has a factor of 2-3 memory overhead: if your
+  hashtable data takes X bytes, dense_hash_map will use 3X-4X memory
+  total.
+
+Hashtables tend to double in size when resizing, creating an
+additional 50% space overhead.  dense_hash_map does in fact have a
+significant "high water mark" memory use requirement.
+sparse_hash_map, however, is written to need very little space
+overhead when resizing: only a few bits per hashtable entry.
+
+PERFORMANCE
+-----------
+You can compile and run the included file time_hash_map.cc to examine
+the performance of sparse_hash_map, dense_hash_map, and your native
+hash_map implementation on your system.  One test against the
+SGI hash_map implementation gave the following timing information for
+a simple find() call:
+   SGI hash_map:     22 ns
+   dense_hash_map:   13 ns
+   sparse_hash_map: 117 ns
+   SGI map:         113 ns
+
+See doc/performance.html for more detailed charts on resource usage
+and performance data.
+
+---
+16 March 2005
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/config.sub
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/config.sub	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/config.sub	(revision 2162)
@@ -0,0 +1,1500 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2003-06-18'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k \
+	| m32r | m68000 | m68k | m88k | mcore \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| msp430 \
+	| ns16k | ns32k \
+	| openrisc | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| s390 | s390x \
+	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+	| strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xscale | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* \
+	| bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* \
+	| m32r-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| msp430-* \
+	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| s390-* | s390x-* \
+	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+	| xtensa-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	mmix*)
+		basic_machine=mmix-knuth
+		os=-mmixware
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nv1)
+		basic_machine=nv1-cray
+		os=-unicosmp
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	or32 | or32-*)
+		basic_machine=or32-unknown
+		os=-coff
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparc | sparcv9 | sparcv9b)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/time_hash_map.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/time_hash_map.vcproj	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/time_hash_map.vcproj	(revision 2162)
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="time_hash_map"
+	ProjectGUID="{AAF9EAEE-03FC-4789-8477-296295C9B6B4}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="5"
+				UsePrecompiledHeader="3"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="4"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="Psapi.lib"
+				OutputFile="$(OutDir)/time_hash_mapd.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/time_hash_mapd.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="4"
+				UsePrecompiledHeader="3"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="Psapi.lib"
+				OutputFile="$(OutDir)/time_hash_map.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="FALSE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\src\time_hash_map.cc">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories="./src"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories="./src"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Include Files"
+			Filter="">
+			<File
+				RelativePath=".\src\google\sparsehash\config.h">
+			</File>
+			<File
+				RelativePath=".\src\google\sparsehash\densehashtable.h">
+			</File>
+			<File
+				RelativePath=".\src\google\sparsehash\hash_fun.h">
+			</File>
+			<File
+				RelativePath=".\src\google\sparsehash\sparsehashtable.h">
+			</File>
+			<File
+				RelativePath=".\src\google\sparsehash\std_hash_fun.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/configure.ac
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/configure.ac	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/configure.ac	(revision 2162)
@@ -0,0 +1,50 @@
+## Process this file with autoconf to produce configure.
+## In general, the safest way to proceed is to run the following:
+##
+##    % aclocal -I `pwd`/../autoconf && autoheader && fgrep -B2 -f src/config.h.include src/google/sparsehash/config.h.in | fgrep -vx -e -- > _sparsehash_config && mv -f _sparsehash_config src/google/sparsehash/config.h.in && autoconf && automake
+##
+## NOTE THE GREP!  We do a little non-standard thing for this package.
+
+# make sure we're interpreted by some minimal autoconf
+AC_PREREQ(2.57)
+
+AC_INIT(sparsehash, 0.3, opensource@google.com)
+# The argument here is just something that should be in the current directory
+# (for sanity checking)
+AC_CONFIG_SRCDIR(README)
+AM_INIT_AUTOMAKE
+AM_CONFIG_HEADER(src/google/sparsehash/config.h)
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_CXX
+
+# Check whether some low-level functions/files are available
+AC_HEADER_STDC
+AC_CHECK_FUNCS(memcpy memmove)
+AC_CHECK_TYPES([u_int16_t])    # defined in most posix systems
+AC_CHECK_TYPES([__uint16])     # defined in some windows systems (vc7)
+# These are 'only' needed for unittests
+AC_CHECK_HEADERS(sys/resource.h unistd.h sys/time.h sys/utsname.h)
+
+# Writes the header files for hash_map, hash_set, and hash_fun into .
+# This also tells us what namespace hash code lives in.
+AC_CXX_MAKE_HASH_MAP_H(src/hash_map.h)
+AC_CXX_MAKE_HASH_FUN_H(src/google/sparsehash/hash_fun.h)
+
+# Find out what namespace 'normal' STL code lives in, and also what namespace
+# the user wants our classes to be defined in
+AC_CXX_STL_NAMESPACE
+AC_DEFINE_GOOGLE_NAMESPACE(google)
+
+# Check what STL features are defined
+AC_CXX_STL_ITERATOR_TAGS
+
+# TODO(csilvers): turn on again once we decide whether we want to enforce
+#                 DECLARE_POD with the hash types
+#AC_CXX_STL_TYPE_TRAITS
+
+# Write generated configuration file
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/TODO
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/TODO	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/TODO	(revision 2162)
@@ -0,0 +1,33 @@
+1) TODO: I/O implementation in densehashtable.h
+
+2) TODO: support non-plain-old-data types for key/value.  Ideally,
+   identify POD situations and use malloc+memmove for them, otherwise
+   use new+copying.
+
+3) TODO: document SPARSEHASH_STAT_UPDATE macro, and also macros that
+   tweak performance.  Perhaps add support to these to the API?
+
+4) TODO: support exceptions?
+
+5) BUG: sparsetable's operator[] doesn't work well with printf: you
+   need to explicitly cast the result to value_type to print it.  (It
+   works fine with streams.)
+
+6) TODO: consider rewriting dense_hash_map to use a 'groups' scheme,
+   like sparsetable, but without the sparse-allocation within a
+   group.  This makes resizing have better memory-use properties.  The
+   downside is that probes across groups might take longer since
+   groups are not contiguous in memory.  Making groups the same size
+   as a cache-line, and ensuring they're loaded on cache-line
+   boundaries, might help.  Needs careful testing to make sure it
+   doesn't hurt performance.
+
+7) TODO: Get the C-only version of sparsehash in experimental/ ready
+   for prime-time.
+
+8) TODO: solve the problem that config.h pollutes the global namespace
+   with all the #defines it makes (any number of which might conflict
+   with a #define in another config.h a user might happen to include).
+
+---
+20 March 2005
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/dense_hash_set.html
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/dense_hash_set.html	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/dense_hash_set.html	(revision 2162)
@@ -0,0 +1,1183 @@
+<HTML>
+<!-- The API of this class and the documentation -- but not the
+     implementation! -- are based on that for SGI's hash_set class:
+  -->
+<!--
+  -- Copyright (c) 1996-1999
+  -- Silicon Graphics Computer Systems, Inc.
+  --
+  -- Permission to use, copy, modify, distribute and sell this software
+  -- and its documentation for any purpose is hereby granted without fee,
+  -- provided that the above copyright notice appears in all copies and
+  -- that both that copyright notice and this permission notice appear
+  -- in supporting documentation.  Silicon Graphics makes no
+  -- representations about the suitability of this software for any
+  -- purpose.  It is provided "as is" without express or implied warranty.
+  --
+  -- Copyright (c) 1994
+  -- Hewlett-Packard Company
+  --
+  -- Permission to use, copy, modify, distribute and sell this software
+  -- and its documentation for any purpose is hereby granted without fee,
+  -- provided that the above copyright notice appears in all copies and
+  -- that both that copyright notice and this permission notice appear
+  -- in supporting documentation.  Hewlett-Packard Company makes no
+  -- representations about the suitability of this software for any
+  -- purpose.  It is provided "as is" without express or implied warranty.
+  --
+  -->
+
+<HEAD>
+<Title>dense_hash_set&lt;Key, HashFcn, EqualKey, Alloc&gt;</Title>
+</HEAD>
+
+<BODY>
+
+<p><i>[Note: this document is formatted similarly to the SGI STL
+implementation documentation pages, and refers to concepts and classes
+defined there.  However, neither this document nor the code it
+describes is associated with SGI, nor is it necessary to have SGI's
+STL implementation installed in order to use this class.]</i></p>
+
+
+<H1>dense_hash_set&lt;Key, HashFcn, EqualKey, Alloc&gt;</H1>
+
+<p><tt>dense_hash_set</tt> is a <A
+href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+Associative Container</A> that stores objects of type <tt>Key</tt>.
+<tt>dense_hash_set</tt> is a <A
+href="http://www.sgi.com/tech/stl/SimpleAssociativeContainer.html">Simple
+Associative Container</A>, meaning that its value type, as well as its
+key type, is <tt>key</tt>  It is also a
+<A
+href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+Associative Container</A>, meaning that no two elements have keys that
+compare equal using <tt>EqualKey</tt>.</p>
+
+<p>Looking up an element in a <tt>dense_hash_set</tt> by its key is
+efficient, so <tt>dense_hash_set</tt> is useful for &quot;dictionaries&quot;
+where the order of elements is irrelevant.  If it is important for the
+elements to be in a particular order, however, then <tt><A
+href="http://www.sgi.com/tech/stl/Map.html">map</A></tt> is more appropriate.</p>
+
+<p><tt>dense_hash_set</tt> is distinguished from other hash-set
+implementations by its speed and by the ability to save
+and restore contents to disk.  On the other hand, this hash-set
+implementation can use significantly more space than other hash-set
+implementations, and it also has requirements -- for instance, for a
+distinguished "empty key" -- that may not be easy for all
+applications to satisfy.</p>
+
+<p>This class is appropriate for applications that need speedy access
+to relatively small "dictionaries" stored in memory, and for
+applications that need these dictionaries to be persistent. <A
+HREF="#io">[implementation note]</A>)</p>
+
+
+<h3>Example</h3>
+
+<pre>
+#include &lt;google/dense_hash_set&gt;
+
+using std::dense_hash_set;      // namespace where class lives by default
+
+struct eqstr
+{
+  bool operator()(const char* s1, const char* s2) const
+  {
+    return strcmp(s1, s2) == 0;
+  }
+};
+
+void lookup(const hash_set&lt;const char*, hash&lt;const char*&gt;, eqstr&gt;&amp; Set,
+            const char* word)
+{
+  dense_hash_set&lt;const char*, hash&lt;const char*&gt;, eqstr&gt;::const_iterator it
+    = Set.find(word);
+  cout &lt;&lt; word &lt;&lt; &quot;: &quot;
+       &lt;&lt; (it != Set.end() ? &quot;present&quot; : &quot;not present&quot;)
+       &lt;&lt; endl;
+}
+
+int main()
+{
+  dense_hash_set&lt;const char*, hash&lt;const char*&gt;, eqstr&gt; Set;
+  Set.set_empty_key(NULL);
+  Set.insert(&quot;kiwi&quot;);
+  Set.insert(&quot;plum&quot;);
+  Set.insert(&quot;apple&quot;);
+  Set.insert(&quot;mango&quot;);
+  Set.insert(&quot;apricot&quot;);
+  Set.insert(&quot;banana&quot;);
+
+  lookup(Set, &quot;mango&quot;);
+  lookup(Set, &quot;apple&quot;);
+  lookup(Set, &quot;durian&quot;);
+}
+</pre>
+
+
+<h3>Definition</h3>
+
+Defined in the header <A
+href="dense_hash_set.h">dense_hash_set.h</A>.  This class is not
+part of the C++ standard.
+
+
+<h3>Template parameters</h3>
+
+<table border>
+<TR><TH>Parameter</TH><TH>Description</TH><TH>Default</TH></TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>Key</tt>
+</TD>
+<TD VAlign=top>
+   The hash_set's key and value type.  This is also defined as
+   <tt>dense_hash_set::key_type</tt> and
+   <tt>dense_hash_set::value_type</tt>.
+</TD>
+<TD VAlign=top>
+   &nbsp;
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>Data</tt>
+</TD>
+<TD VAlign=top>
+   The hash_set's data type.  This is also defined as
+   <tt>dense_hash_set::data_type</tt>.
+</TD>
+<TD VAlign=top>
+   &nbsp;
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>HashFcn</tt>
+</TD>
+<TD VAlign=top>
+   The <A href="http://www.sgi.com/tech/stl/HashFunction.html">hash function</A> used by the
+   hash_set.  This is also defined as <tt>dense_hash_set::hasher</tt>.  
+   <br><b>Note:</b> Hashtable performance depends heavliy on the choice of
+   hash function.  See <A HREF="performance.html#hashfn">the performance
+   page</A> for more information.
+</TD>
+<TD VAlign=top>
+   <tt><A href="http://www.sgi.com/tech/stl/hash.html">hash</A>&lt;Key&gt;</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>EqualKey</tt>
+</TD>
+<TD VAlign=top>
+   The hash_set key equality function: a <A
+   href="http://www.sgi.com/tech/stl/BinaryPredicate.html">binary predicate</A> that determines
+   whether two keys are equal.  This is also defined as
+   <tt>dense_hash_set::key_equal</tt>.
+</TD>
+<TD VAlign=top>
+   <tt><A href="http://www.sgi.com/tech/stl/equal_to.html">equal_to</A>&lt;Key&gt;</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>Alloc</tt>
+</TD>
+<TD VAlign=top>
+   <b>Ignored</b>; this is included only for API-compatibility
+   with SGI's STL implementation.
+</TD>
+<TD VAlign=top>
+    <tt><A href="http://www.sgi.com/tech/stl/Allocators.html">alloc</A></tt>
+</TD>
+</TR>
+
+</table>
+
+
+<h3>Model of</h3>
+
+<A href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique Hashed Associative Container</A>,
+<A href="http://www.sgi.com/tech/stl/SimpleAssociativeContainer.html">Simple Associative Container</A>
+
+
+<h3>Type requirements</h3>
+
+<UL>
+<LI>
+<tt>Key</tt> is Assignable.
+<LI>
+<tt>EqualKey</tt> is a Binary Predicate whose argument type is Key.
+<LI>
+<tt>EqualKey</tt> is an equivalence relation.
+<LI>
+<tt>Alloc</tt> is an Allocator.
+</UL>
+
+
+<h3>Public base classes</h3>
+
+None.
+
+
+<h3>Members</h3>
+
+<table border>
+<TR><TH>Member</TH><TH>Where defined</TH><TH>Description</TH></TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>value_type</tt> <A href="#5">[7]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   The type of object, <tt>T</tt>, stored in the hash_set.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>key_type</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   The key type associated with <tt>value_type</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>hasher</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   The <tt>dense_hash_set</tt>'s <A
+   href="http://www.sgi.com/tech/stl/HashFunction.html">hash
+   function</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>key_equal</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/functors.html">Function
+    object</A> that compares keys for equality.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>pointer</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Pointer to <tt>T</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reference</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Reference to <tt>T</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reference</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Const reference to <tt>T</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   An unsigned integral type.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>difference_type</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   A signed integral type.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Iterator used to iterate through a <tt>dense_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_iterator</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Const iterator used to iterate through a <tt>dense_hash_set</tt>.
+   (<tt>iterator</tt> and <tt>const_iterator</tt> are the same type.)
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator begin() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>iterator</tt> pointing to the beginning of the
+   <tt>dense_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator end() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>iterator</tt> pointing to the end of the
+   <tt>dense_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type size() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the size of the <tt>dense_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type max_size() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the largest possible size of the <tt>dense_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool empty() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   <tt>true</tt> if the <tt>dense_hash_set</tt>'s size is <tt>0</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type bucket_count() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the number of buckets used by the <tt>dense_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type max_bucket_count() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the largest possible number of buckets used by the <tt>dense_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void resize(size_type n)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Increases the bucket count to at least <tt>n</tt>.
+   <A href="#2">[4]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>hasher hash_funct() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the <tt>hasher</tt> object used by the <tt>dense_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>key_equal key_eq() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the <tt>key_equal</tt> object used by the
+   <tt>dense_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>dense_hash_set()</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>dense_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>dense_hash_set(size_type n)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>dense_hash_set</tt> that's optimized for holding
+   up to <tt>n</tt> items.
+   <A href="#3">[5]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>dense_hash_set(size_type n, const hasher&amp; h)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>dense_hash_set</tt> that's optimized for up
+   to <tt>n</tt> items, using <tt>h</tt> as the hash function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>dense_hash_set(size_type n, const hasher&amp; h, const
+   key_equal&amp; k)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>dense_hash_set</tt> that's optimized for up
+   to <tt>n</tt> items, using <tt>h</tt> as the hash function and
+   <tt>k</tt> as the key equal function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+dense_hash_set(InputIterator f, InputIterator l) </pre>
+<A href="#1">[2]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a dense_hash_set with a copy of a range.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+dense_hash_set(InputIterator f, InputIterator l, size_type n) </pre>
+<A href="#1">[2]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a hash_set with a copy of a range that's optimized to
+   hold up to <tt>n</tt> items.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+dense_hash_set(InputIterator f, InputIterator l, size_type n, const
+hasher&amp; h) </pre> <A href="#1">[2]</A> 
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a hash_set with a copy of a range that's optimized to hold
+   up to <tt>n</tt> items, using <tt>h</tt> as the hash function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+dense_hash_set(InputIterator f, InputIterator l, size_type n, const
+hasher&amp; h, const key_equal&amp; k) </pre> <A href="#1">[2]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a hash_set with a copy of a range that's optimized for
+   holding up to <tt>n</tt> items, using <tt>h</tt> as the hash
+   function and <tt>k</tt> as the key equal function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>dense_hash_set(const hash_set&amp;)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   The copy constructor.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>dense_hash_set&amp; operator=(const hash_set&amp;)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   The assignment operator
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void swap(hash_set&amp;)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Swaps the contents of two hash_sets.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>pair&lt;iterator, bool&gt; insert(const value_type&amp; x)
+</pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Inserts <tt>x</tt> into the <tt>dense_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+void insert(InputIterator f, InputIterator l) </pre> <A href="#1">[2]</A> 
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Inserts a range into the <tt>dense_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void set_empty_key(const key_type& key)</tt> <A href="#6">[6]</A>
+</TD>
+<TD VAlign=top>
+   <tt>dense_hash_set</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void set_deleted_key(const key_type& key)</tt> <A href="#6">[6]</A>
+</TD>
+<TD VAlign=top>
+   <tt>dense_hash_set</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void clear_deleted_key()</tt> <A href="#4">[6]</A>
+</TD>
+<TD VAlign=top>
+   <tt>dense_hash_set</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void erase(iterator pos)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases the element pointed to by <tt>pos</tt>.
+   <A href="#4">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type erase(const key_type&amp; k)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases the element whose key is <tt>k</tt>.
+   <A href="#4">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void erase(iterator first, iterator last)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases all elements in a range.
+   <A href="#4">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void clear()</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases all of the elements.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator find(const key_type&amp; k) const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Finds an element whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type count(const key_type&amp; k) const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Counts the number of elements whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>pair&lt;iterator, iterator&gt; equal_range(const
+key_type&amp; k) const</pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Finds a range containing all elements whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>dense_hash_set</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>dense_hash_set</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>dense_hash_set</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>dense_hash_set</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>bool operator==(const hash_set&amp;, const hash_set&amp;)
+</pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Tests two hash_sets for equality.  This is a global function, not a
+   member function.
+</TD>
+</TR>
+
+</table>
+
+
+<h3>New members</h3>
+
+These members are not defined in the <A
+href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+Hashed Associative Container</A> and <A
+href="http://www.sgi.com/tech/stl/SimpleAssociativeContainer.html">Simple
+Associative Container</A> requirements, but are specific to
+<tt>dense_hash_set</tt>.
+
+<table border>
+<TR><TH>Member</TH><TH>Description</TH></TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void set_empty_key(const key_type& key)</tt>
+</TD>
+<TD VAlign=top>
+   Sets the distinguished "empty" key to <tt>key</tt>.  This must be
+   called immediately after construct time, before calls to another
+   other <tt>dense_hash_set</tt> operation. <A href="#6">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void set_deleted_key(const key_type& key)</tt>
+</TD>
+<TD VAlign=top>
+   Sets the distinguished "deleted" key to <tt>key</tt>.  This must be
+   called before any calls to <tt>erase()</tt>. <A href="#4">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void clear_deleted_key()</tt> <A href="#4">[6]</A>
+</TD>
+<TD VAlign=top>
+   Clears the distinguished "deleted" key.  After this is called,
+   calls to <tt>erase()</tt> are not valid on this object.
+   <A href="#4">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Write hashtable metadata to <tt>fp</tt>.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Read hashtable metadata from <tt>fp</tt>.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Write hashtable contents to <tt>fp</tt>.  This is valid only if the
+   hashtable key and value are "plain" data.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Read hashtable contents to <tt>fp</tt>.  This is valid only if the
+   hashtable key and value are "plain" data.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+</table>
+
+
+<h3>Notes</h3>
+
+<P><A name="1">[1]</A>
+
+This member function relies on <i>member template</i> functions, which
+may not be supported by all compilers.  If your compiler supports
+member templates, you can call this function with any type of <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">input
+iterator</A>.  If your compiler does not yet support member templates,
+though, then the arguments must either be of type <tt>const
+value_type*</tt> or of type <tt>dense_hash_set::const_iterator</tt>.</p>
+
+<P><A name="2">[2]</A>
+
+In order to preserve iterators, erasing hashtable elements does not
+cause a hashtable to resize.  This means that after a string of
+<tt>erase()</tt> calls, the hashtable will use more space than is
+required.  At a cost of invalidating all current iterators, you can
+call <tt>resize()</tt> to manually compact the hashtable.  The
+hashtable promotes too-small <tt>resize()</tt> arguments to the
+smallest legal value, so to compact a hashtable, it's sufficient to
+call <tt>resize(0)</tt>.
+
+<P><A name="3">[3]</A>
+
+Unlike some other hashtable implementations, the optional <i>n</i> in
+the constructor size indicates not the desired number of buckets that
+should be allocated, but instead the expected number of items to be
+inserted.  The class then sizes the hash-set appropriately for the
+number of items specified.  It's not an error to actually insert more
+or fewer items into the hashtable, but the implementation is most
+efficient -- does the fewest hashtable resizes -- if the number of
+inserted items is close to <i>n</i>.</p>
+
+<P><A name="4">[4]</A>
+
+<tt>dense_hash_set</tt> <b>requires</b> you call
+<tt>set_empty_key()</tt> immediately after constructing the hash-set,
+and before calling any other <tt>dense_hash_set</tt> method.  (This is
+the largest difference between the <tt>dense_hash_set</tt> API and
+other hash-set APIs.  See <A HREF="implementation.html">implementation.html</A>
+for why this is necessary.)
+The argument to <tt>set_empty_key()</tt> should be a key-value that
+is never used for legitimate hash-set entries.  If you have no such
+key value, you will be unable to use <tt>dense_hash_set</tt>.  It is
+an error to call <tt>insert()</tt> with an item whose key is the
+"empty key."</p>
+
+<tt>dense_hash_set</tt> also requires you call
+<tt>set_deleted_key()</tt> before calling <tt>erase()</tt>.
+The argument to <tt>set_deleted_key()</tt> should be a key-value that
+is never used for legitimate hash-set entries.  It must be different
+from the key-value used for <tt>set_empty_key()</tt>.  It is an error to call
+<tt>erase()</tt> without first calling <tt>set_deleted_key()</tt>, and
+it is also an error to call <tt>insert()</tt> with an item whose key
+is the "deleted key."</p>
+
+<p>There is no need to call <tt>set_deleted_key</tt> if you do not
+wish to call <tt>erase()</tt> on the hash-set.</p>
+
+<p>It is acceptable to change the deleted-key at any time by calling
+<tt>set_deleted_key()</tt> with a new argument.  You can also call
+<tt>clear_deleted_key()</tt>, at which point all keys become valid for
+insertion but no hashtable entries can be deleted until
+<tt>set_deleted_key()</tt> is called again.</p>
+
+<P><A name="5">[5]</A>
+
+Both <tt>key_type</tt> and <tt>data_type</tt> must be <A
+HREF="http://c2.com/cgi/wiki?PlainOldData">plain old data</A> (see
+<A HREF="implementation.html">implementation.html</A> for why this is
+necessary).  In addition, there should
+be no data structures that point directly into parts of key or value,
+including the key or value itself (for instance, you cannot have a
+value like <tt>struct {int a = 1, *b = &a}</tt>.  This is because
+<tt>dense_hash_set</tt> uses <tt>malloc()</tt> and <tt>free()</tt> to
+allocate space for the key and value, and <tt>memmove()</tt> to
+reorganize the key and value in memory.</p>
+
+<p>Almost all common uses fit this criterion: <tt>key_type</tt> can be
+a basic C type or an STL type like <tt>string</tt>, for instance.  If
+<tt>value_type</tt> is complex, consider storing only the pointer to
+the data in the <tt>dense_hash_set</tt>.  This will speed up the
+hashtable as well, since hashtable resizes will have to manipulate
+less memory.</p>
+
+
+<h3><A NAME=io>Input/Output</A></h3>
+
+<table border=1 cellpadding=5><tr><td>
+<p><b>IMPORTANT IMPLEMENTATION NOTE:</b> In the current version of
+this code, the input/output routines for <tt>dense_hash_set</tt> have
+<b>not yet been implemented</b>.  This section explains the API, but
+note that all calls to these routines will fail (return
+<tt>false</tt>).  It is a TODO to remedy this situation.</p>
+</td></tr></table>
+
+<p>It is possible to save and restore <tt>dense_hash_set</tt> objects
+to disk.  Storage takes place in two steps.  The first writes the
+hashtable metadata.  The second writes the actual data.</p>
+
+<p>To write a hashtable to disk, first call <tt>write_metadata()</tt>
+on an open file pointer.  This saves the hashtable information in a
+byte-order-independent format.</p>
+
+<p>After the metadata has been written to disk, you must write the
+actual data stored in the hash-set to disk.  If both the key and data
+are "simple" enough, you can do this by calling
+<tt>write_nopointer_data()</tt>.  "Simple" data is data that can be
+safely copied to disk via <tt>fwrite()</tt>.  Native C data types fall
+into this category, as do structs of native C data types.  Pointers
+and STL objects do not.</p>
+
+<p>Note that <tt>write_nopointer_data()</tt> does not do any endian
+conversion.  Thus, it is only appropriate when you intend to read the
+data on the same endian architecture as you write the data.</p>
+
+<p>If you cannot use <tt>write_nopointer_data()</tt> for any reason,
+you can write the data yourself by iterating over the
+<tt>dense_hash_set</tt> with a <tt>const_iterator</tt> and writing
+the key and data in any manner you wish.</p>
+
+<p>To read the hashtable information from disk, first you must create
+a <tt>dense_hash_set</tt> object.  Then open a file pointer to point
+to the saved hashtable, and call <tt>read_metadata()</tt>.  If you
+saved the data via <tt>write_nopointer_data()</tt>, you can follow the
+<tt>read_metadata()</tt> call with a call to
+<tt>read_nopointer_data()</tt>.  This is all that is needed.</p>
+
+<p>If you saved the data through a custom write routine, you must call
+a custom read routine to read in the data.  To do this, iterate over
+the <tt>dense_hash_set</tt> with an <tt>iterator</tt>; this operation
+is sensical because the metadata has already been set up.  For each
+iterator item, you can read the key and value from disk, and set it
+appropriately.  You will need to do a <tt>const_cast</tt> on the
+iterator, since <tt>it-&gt;first</tt> is always <tt>const</tt>.  The
+code might look like this:</p>
+<pre>
+   for (dense_hash_set&lt;int*, int&gt;::iterator it = ht.begin();
+        it != ht.end(); ++it) {
+       const_cast&lt;int*&gt;(it-&gt;first) = new int;
+       fread(const_cast&lt;int*&gt;(it-&gt;first), sizeof(int), 1, fp);
+       fread(&it-&gt;second, sizeof(int), 1, fp);
+   }
+</pre>
+
+
+<h3><A NAME=iter>Validity of Iterators</A></h3>
+
+<p><tt>insert()</tt> invalidates all iterators, as does
+<tt>resize()</tt>.  <tt>erase()</tt> is guaranteed not to invalidate
+any iterators.</p>
+
+<p>This is implemented by making <tt>erase()</tt> not resize the
+hashtable.  If you desire maximum space efficiency, you can call
+<tt>resize(0)</tt> after a string of <tt>erase()</tt> calls, to force
+the hashtable to resize to the smallest possible size.</p>
+
+
+<h3>See also</h3>
+
+<p>The following are SGI STL concepts and classes related to
+<tt>dense_hash_set</tt>.</p>
+
+<tt><A href="http://www.sgi.com/tech/stl/hash_set.html">hash_set</A></tt>,
+<A href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative Container</A>,
+<A href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed Associative Container</A>, 
+<A href="http://www.sgi.com/tech/stl/SimpleAssociativeContainer.html">Simple Associative Container</A>,
+<A href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique Hashed Associative Container</A>, 
+<tt><A href="http://www.sgi.com/tech/stl/set.html">set</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/Map.html">map</A></tt>
+<tt><A href="http://www.sgi.com/tech/stl/multiset.html">multiset</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/Multimap.html">multimap</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/hash_map.html">hash_map</A></tt>, 
+<tt><A href="http://www.sgi.com/tech/stl/hash_multiset.html">hash_multiset</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/hash_multimap.html">hash_multimap</A></tt>,
+<tt><A href="sparse_hash_set.html">sparse_hash_set</A></tt>,
+<tt><A href="sparse_hash_map.html">sparse_hash_map</A></tt>,
+<tt><A href="dense_hash_map.html">dense_hash_map</A></tt>
+
+</BODY>
+</HTML> 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/sparse_hash_map.html
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/sparse_hash_map.html	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/sparse_hash_map.html	(revision 2162)
@@ -0,0 +1,1263 @@
+<HTML>
+<!-- The API of this class and the documentation -- but not the
+     implementation! -- are based on that for SGI's hash_map class:
+  -->
+<!--
+  -- Copyright (c) 1996-1999
+  -- Silicon Graphics Computer Systems, Inc.
+  --
+  -- Permission to use, copy, modify, distribute and sell this software
+  -- and its documentation for any purpose is hereby granted without fee,
+  -- provided that the above copyright notice appears in all copies and
+  -- that both that copyright notice and this permission notice appear
+  -- in supporting documentation.  Silicon Graphics makes no
+  -- representations about the suitability of this software for any
+  -- purpose.  It is provided "as is" without express or implied warranty.
+  --
+  -- Copyright (c) 1994
+  -- Hewlett-Packard Company
+  --
+  -- Permission to use, copy, modify, distribute and sell this software
+  -- and its documentation for any purpose is hereby granted without fee,
+  -- provided that the above copyright notice appears in all copies and
+  -- that both that copyright notice and this permission notice appear
+  -- in supporting documentation.  Hewlett-Packard Company makes no
+  -- representations about the suitability of this software for any
+  -- purpose.  It is provided "as is" without express or implied warranty.
+  --
+  -->
+
+<HEAD>
+<Title>sparse_hash_map&lt;Key, Data, HashFcn, EqualKey, Alloc&gt;</Title>
+</HEAD>
+
+<BODY>
+
+<p><i>[Note: this document is formatted similarly to the SGI STL
+implementation documentation pages, and refers to concepts and classes
+defined there.  However, neither this document nor the code it
+describes is associated with SGI, nor is it necessary to have SGI's
+STL implementation installed in order to use this class.]</i></p>
+
+
+<H1>sparse_hash_map&lt;Key, Data, HashFcn, EqualKey, Alloc&gt;</H1>
+
+<p><tt>sparse_hash_map</tt> is a <A
+href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+Associative Container</A> that associates objects of type <tt>Key</tt>
+with objects of type <tt>Data</tt>.  <tt>sparse_hash_map</tt> is a <A
+href="http://www.sgi.com/tech/stl/PairAssociativeContainer.html">Pair
+Associative Container</A>, meaning that its value type is <tt><A
+href="pair.html">pair</A>&lt;const Key, Data&gt;</tt>.  It is also a
+<A
+href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+Associative Container</A>, meaning that no two elements have keys that
+compare equal using <tt>EqualKey</tt>.</p>
+
+<p>Looking up an element in a <tt>sparse_hash_map</tt> by its key is
+efficient, so <tt>sparse_hash_map</tt> is useful for &quot;dictionaries&quot;
+where the order of elements is irrelevant.  If it is important for the
+elements to be in a particular order, however, then <tt><A
+href="http://www.sgi.com/tech/stl/Map.html">map</A></tt> is more appropriate.</p>
+
+<p><tt>sparse_hash_map</tt> is distinguished from other hash-map
+implementations by its stingy use of memory and by the ability to save
+and restore contents to disk.  On the other hand, this hash-map
+implementation, while still efficient, is slower than other hash-map
+implementations, and it also has requirements -- for instance, for a
+distinguished "deleted key" -- that may not be easy for all
+applications to satisfy.</p>
+
+<p>This class is appropriate for applications that need to store
+large "dictionaries" in memory, and for applications that need these
+dictionaries to be persistent.</p>
+
+
+<h3>Example</h3>
+
+<pre>
+#include &lt;google/sparse_hash_map&gt;
+
+using std::sparse_hash_map;      // namespace where class lives by default
+
+struct eqstr
+{
+  bool operator()(const char* s1, const char* s2) const
+  {
+    return strcmp(s1, s2) == 0;
+  }
+};
+
+int main()
+{
+  sparse_hash_map&lt;const char*, int, hash&lt;const char*&gt;, eqstr&gt; months;
+  
+  months.set_empty_key(NULL);
+  months[&quot;january&quot;] = 31;
+  months[&quot;february&quot;] = 28;
+  months[&quot;march&quot;] = 31;
+  months[&quot;april&quot;] = 30;
+  months[&quot;may&quot;] = 31;
+  months[&quot;june&quot;] = 30;
+  months[&quot;july&quot;] = 31;
+  months[&quot;august&quot;] = 31;
+  months[&quot;september&quot;] = 30;
+  months[&quot;october&quot;] = 31;
+  months[&quot;november&quot;] = 30;
+  months[&quot;december&quot;] = 31;
+  
+  cout &lt;&lt; &quot;september -&gt; &quot; &lt;&lt; months[&quot;september&quot;] &lt;&lt; endl;
+  cout &lt;&lt; &quot;april     -&gt; &quot; &lt;&lt; months[&quot;april&quot;] &lt;&lt; endl;
+  cout &lt;&lt; &quot;june      -&gt; &quot; &lt;&lt; months[&quot;june&quot;] &lt;&lt; endl;
+  cout &lt;&lt; &quot;november  -&gt; &quot; &lt;&lt; months[&quot;november&quot;] &lt;&lt; endl;
+}
+</pre>
+
+
+<h3>Definition</h3>
+
+Defined in the header <A
+href="sparse_hash_map.h">sparse_hash_map.h</A>.  This class is not
+part of the C++ standard.
+
+
+<h3>Template parameters</h3>
+
+<table border>
+<TR><TH>Parameter</TH><TH>Description</TH><TH>Default</TH></TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>Key</tt>
+</TD>
+<TD VAlign=top>
+   The hash_map's key type.  This is also defined as
+   <tt>sparse_hash_map::key_type</tt>.
+</TD>
+<TD VAlign=top>
+   &nbsp;
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>Data</tt>
+</TD>
+<TD VAlign=top>
+   The hash_map's data type.  This is also defined as
+   <tt>sparse_hash_map::data_type</tt>.
+</TD>
+<TD VAlign=top>
+   &nbsp;
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>HashFcn</tt>
+</TD>
+<TD VAlign=top>
+   The <A href="http://www.sgi.com/tech/stl/HashFunction.html">hash function</A> used by the
+   hash_map.  This is also defined as <tt>sparse_hash_map::hasher</tt>.
+   <br><b>Note:</b> Hashtable performance depends heavliy on the choice of
+   hash function.  See <A HREF="performance.html#hashfn">the performance
+   page</A> for more information.
+</TD>
+<TD VAlign=top>
+   <tt><A href="http://www.sgi.com/tech/stl/hash.html">hash</A>&lt;Key&gt;</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>EqualKey</tt>
+</TD>
+<TD VAlign=top>
+   The hash_map key equality function: a <A
+   href="http://www.sgi.com/tech/stl/BinaryPredicate.html">binary predicate</A> that determines
+   whether two keys are equal.  This is also defined as
+   <tt>sparse_hash_map::key_equal</tt>.
+</TD>
+<TD VAlign=top>
+   <tt><A href="http://www.sgi.com/tech/stl/equal_to.html">equal_to</A>&lt;Key&gt;</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>Alloc</tt>
+</TD>
+<TD VAlign=top>
+   <b>Ignored</b>; this is included only for API-compatibility
+   with SGI's STL implementation.
+</TD>
+<TD VAlign=top>
+    <tt><A href="http://www.sgi.com/tech/stl/Allocators.html">alloc</A></tt>
+</TD>
+</TR>
+
+</table>
+
+
+<h3>Model of</h3>
+
+<A href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique Hashed Associative Container</A>,
+<A href="http://www.sgi.com/tech/stl/PairAssociativeContainer.html">Pair Associative Container</A>
+
+
+<h3>Type requirements</h3>
+
+<UL>
+<LI>
+<tt>Key</tt> is Assignable.
+<LI>
+<tt>EqualKey</tt> is a Binary Predicate whose argument type is Key.
+<LI>
+<tt>EqualKey</tt> is an equivalence relation.
+<LI>
+<tt>Alloc</tt> is an Allocator.
+</UL>
+
+
+<h3>Public base classes</h3>
+
+None.
+
+
+<h3>Members</h3>
+
+<table border>
+<TR><TH>Member</TH><TH>Where defined</TH><TH>Description</TH></TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>key_type</tt> <A href="#7">[7]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   The <tt>sparse_hash_map</tt>'s key type, <tt>Key</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>data_type</tt> <A href="#7">[7]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/PairAssociativeContainer.html">Pair
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   The type of object associated with the keys.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>value_type</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/PairAssociativeContainer.html">Pair
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   The type of object, <tt>pair&lt;const key_type, data_type&gt;</tt>,
+   stored in the hash_map.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>hasher</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   The <tt>sparse_hash_map</tt>'s <A
+   href="http://www.sgi.com/tech/stl/HashFunction.html">hash
+   function</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>key_equal</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/functors.html">Function
+    object</A> that compares keys for equality.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>pointer</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Pointer to <tt>T</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reference</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Reference to <tt>T</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reference</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Const reference to <tt>T</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   An unsigned integral type.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>difference_type</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   A signed integral type.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Iterator used to iterate through a <tt>sparse_hash_map</tt>. <A
+   href="#1">[1]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_iterator</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Const iterator used to iterate through a <tt>sparse_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator begin()</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>iterator</tt> pointing to the beginning of the
+   <tt>sparse_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator end()</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>iterator</tt> pointing to the end of the
+   <tt>sparse_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_iterator begin() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>const_iterator</tt> pointing to the beginning of the
+   <tt>sparse_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_iterator end() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>const_iterator</tt> pointing to the end of the
+   <tt>sparse_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type size() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the size of the <tt>sparse_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type max_size() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the largest possible size of the <tt>sparse_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool empty() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   <tt>true</tt> if the <tt>sparse_hash_map</tt>'s size is <tt>0</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type bucket_count() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the number of buckets used by the <tt>sparse_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type max_bucket_count() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the largest possible number of buckets used by the <tt>sparse_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void resize(size_type n)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Increases the bucket count to at least <tt>n</tt>.
+   <A href="#4">[4]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>hasher hash_funct() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the <tt>hasher</tt> object used by the <tt>sparse_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>key_equal key_eq() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the <tt>key_equal</tt> object used by the
+   <tt>sparse_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>sparse_hash_map()</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>sparse_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>sparse_hash_map(size_type n)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>sparse_hash_map</tt> that's optimized for holding
+   up to <tt>n</tt> items.
+   <A href="#5">[5]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>sparse_hash_map(size_type n, const hasher&amp; h)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>sparse_hash_map</tt> that's optimized for up
+   to <tt>n</tt> items, using <tt>h</tt> as the hash function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>sparse_hash_map(size_type n, const hasher&amp; h, const
+   key_equal&amp; k)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>sparse_hash_map</tt> that's optimized for up
+   to <tt>n</tt> items, using <tt>h</tt> as the hash function and
+   <tt>k</tt> as the key equal function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+sparse_hash_map(InputIterator f, InputIterator l) </pre>
+<A href="#2">[2]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a sparse_hash_map with a copy of a range.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+sparse_hash_map(InputIterator f, InputIterator l, size_type n) </pre>
+<A href="#2">[2]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a hash_map with a copy of a range that's optimized to
+   hold up to <tt>n</tt> items.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+sparse_hash_map(InputIterator f, InputIterator l, size_type n, const
+hasher&amp; h) </pre> <A href="#2">[2]</A> 
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a hash_map with a copy of a range that's optimized to hold
+   up to <tt>n</tt> items, using <tt>h</tt> as the hash function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+sparse_hash_map(InputIterator f, InputIterator l, size_type n, const
+hasher&amp; h, const key_equal&amp; k) </pre> <A href="#2">[2]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a hash_map with a copy of a range that's optimized for
+   holding up to <tt>n</tt> items, using <tt>h</tt> as the hash
+   function and <tt>k</tt> as the key equal function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>sparse_hash_map(const hash_map&amp;)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   The copy constructor.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>sparse_hash_map&amp; operator=(const hash_map&amp;)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   The assignment operator
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void swap(hash_map&amp;)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Swaps the contents of two hash_maps.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>pair&lt;iterator, bool&gt; insert(const value_type&amp; x)
+</pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Inserts <tt>x</tt> into the <tt>sparse_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+void insert(InputIterator f, InputIterator l) </pre> <A href="#2">[2]</A> 
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Inserts a range into the <tt>sparse_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void set_deleted_key(const key_type& key)</tt> <A href="#6">[6]</A>
+</TD>
+<TD VAlign=top>
+   <tt>sparse_hash_map</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void clear_deleted_key()</tt> <A href="#6">[6]</A>
+</TD>
+<TD VAlign=top>
+   <tt>sparse_hash_map</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void erase(iterator pos)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases the element pointed to by <tt>pos</tt>.
+   <A href="#6">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type erase(const key_type&amp; k)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases the element whose key is <tt>k</tt>.
+   <A href="#6">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void erase(iterator first, iterator last)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases all elements in a range.
+   <A href="#6">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void clear()</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases all of the elements.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_iterator find(const key_type&amp; k) const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Finds an element whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator find(const key_type&amp; k)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Finds an element whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type count(const key_type&amp; k) const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Counts the number of elements whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>pair&lt;const_iterator, const_iterator&gt; equal_range(const
+key_type&amp; k) const </pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Finds a range containing all elements whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>pair&lt;iterator, iterator&gt; equal_range(const
+key_type&amp; k) </pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Finds a range containing all elements whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>data_type&amp; operator[](const key_type&amp; k) <A
+   href="http://www.sgi.com/tech/stl/#3">[3]</A> </pre>
+</TD>
+<TD VAlign=top>
+   <tt>sparse_hash_map</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparse_hash_map</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparse_hash_map</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparse_hash_map</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparse_hash_map</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>bool operator==(const hash_map&amp;, const hash_map&amp;)
+</pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Tests two hash_maps for equality.  This is a global function, not a
+   member function.
+</TD>
+</TR>
+
+</table>
+
+
+<h3>New members</h3>
+
+These members are not defined in the <A
+href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+Hashed Associative Container</A> and <A
+href="http://www.sgi.com/tech/stl/PairAssociativeContainer.html">Pair
+Associative Container</A> requirements, but are specific to
+<tt>sparse_hash_map</tt>.
+
+<table border>
+<TR><TH>Member</TH><TH>Description</TH></TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void set_deleted_key(const key_type& key)</tt>
+</TD>
+<TD VAlign=top>
+   Sets the distinguished "deleted" key to <tt>key</tt>.  This must be
+   called before any calls to <tt>erase()</tt>. <A href="#6">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void clear_deleted_key()</tt> <A href="#6">[6]</A>
+</TD>
+<TD VAlign=top>
+   Clears the distinguished "deleted" key.  After this is called,
+   calls to <tt>erase()</tt> are not valid on this object.
+   <A href="#6">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>
+   data_type&amp; 
+   operator[](const key_type&amp; k) <A
+   href="http://www.sgi.com/tech/stl/#3">[3]</A>
+</pre>
+</TD>
+<TD VAlign=top>
+   Returns a reference to the object that is associated with
+   a particular key.  If the <tt>sparse_hash_map</tt> does not already
+   contain such an object, <tt>operator[]</tt> inserts the default
+   object <tt>data_type()</tt>. <A
+   href="http://www.sgi.com/tech/stl/#3">[3]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Write hashtable metadata to <tt>fp</tt>.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Read hashtable metadata from <tt>fp</tt>.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Write hashtable contents to <tt>fp</tt>.  This is valid only if the
+   hashtable key and value are "plain" data.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Read hashtable contents to <tt>fp</tt>.  This is valid only if the
+   hashtable key and value are "plain" data.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+</table>
+
+
+<h3>Notes</h3>
+
+<P><A name="1">[1]</A>
+
+<tt>sparse_hash_map::iterator</tt> is not a mutable iterator, because
+<tt>sparse_hash_map::value_type</tt> is not <A
+href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</A>.
+That is, if <tt>i</tt> is of type <tt>sparse_hash_map::iterator</tt>
+and <tt>p</tt> is of type <tt>sparse_hash_map::value_type</tt>, then
+<tt>*i = p</tt> is not a valid expression.  However,
+<tt>sparse_hash_map::iterator</tt> isn't a constant iterator either,
+because it can be used to modify the object that it points to.  Using
+the same notation as above, <tt>(*i).second = p</tt> is a valid
+expression.</p>
+
+<P><A name="2">[2]</A>
+
+This member function relies on <i>member template</i> functions, which
+may not be supported by all compilers.  If your compiler supports
+member templates, you can call this function with any type of <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">input
+iterator</A>.  If your compiler does not yet support member templates,
+though, then the arguments must either be of type <tt>const
+value_type*</tt> or of type <tt>sparse_hash_map::const_iterator</tt>.</p>
+
+<P><A name="3">[3]</A>
+
+Since <tt>operator[]</tt> might insert a new element into the
+<tt>sparse_hash_map</tt>, it can't possibly be a <tt>const</tt> member
+function.  Note that the definition of <tt>operator[]</tt> is
+extremely simple: <tt>m[k]</tt> is equivalent to
+<tt>(*((m.insert(value_type(k, data_type()))).first)).second</tt>.
+Strictly speaking, this member function is unnecessary: it exists only
+for convenience.</p>
+
+<P><A name="4">[4]</A>
+
+In order to preserve iterators, erasing hashtable elements does not
+cause a hashtable to resize.  This means that after a string of
+<tt>erase()</tt> calls, the hashtable will use more space than is
+required.  At a cost of invalidating all current iterators, you can
+call <tt>resize()</tt> to manually compact the hashtable.  The
+hashtable promotes too-small <tt>resize()</tt> arguments to the
+smallest legal value, so to compact a hashtable, it's sufficient to
+call <tt>resize(0)</tt>.
+
+<P><A name="5">[5]</A>
+
+Unlike some other hashtable implementations, the optional <i>n</i> in
+the constructor size indicates not the desired number of buckets that
+should be allocated, but instead the expected number of items to be
+inserted.  The class then sizes the hash-map appropriately for the
+number of items specified.  It's not an error to actually insert more
+or fewer items into the hashtable, but the implementation is most
+efficient -- does the fewest hashtable resizes -- if the number of
+inserted items is close to <i>n</i>.</p>
+
+<P><A name="6">[6]</A>
+
+<tt>sparse_hash_map</tt> <b>requires</b> you call
+<tt>set_deleted_key()</tt> before calling <tt>erase()</tt>.  (This is
+the largest difference between the <tt>sparse_hash_map</tt> API and
+other hash-map APIs.  See <A HREF="implementation.html">implementation.html</A>
+for why this is necessary.)
+The argument to <tt>set_deleted_key()</tt> should be a key-value that
+is never used for legitimate hash-map entries.  It is an error to call
+<tt>erase()</tt> without first calling <tt>set_deleted_key()</tt>, and
+it is also an error to call <tt>insert()</tt> with an item whose key
+is the "deleted key."</p>
+
+<p>There is no need to call <tt>set_deleted_key</tt> if you do not
+wish to call <tt>erase()</tt> on the hash-map.</p>
+
+<p>It is acceptable to change the deleted-key at any time by calling
+<tt>set_deleted_key()</tt> with a new argument.  You can also call
+<tt>clear_deleted_key()</tt>, at which point all keys become valid for
+insertion but no hashtable entries can be deleted until
+<tt>set_deleted_key()</tt> is called again.</p>
+
+<P><A name="7">[7]</A>
+
+Both <tt>key_type</tt> and <tt>data_type</tt> must be <A
+HREF="http://c2.com/cgi/wiki?PlainOldData">plain old data</A> (see
+<A HREF="implementation.html">implementation.html</A> for why this is
+necessary).  In addition, there should
+be no data structures that point directly into parts of key or value,
+including the key or value itself (for instance, you cannot have a
+value like <tt>struct {int a = 1, *b = &a}</tt>.  This is because
+<tt>sparse_hash_map</tt> uses <tt>malloc()</tt> and <tt>free()</tt> to
+allocate space for the key and value, and <tt>memmove()</tt> to
+reorganize the key and value in memory.</p>
+
+<p>Almost all common uses fit this criterion: <tt>key_type</tt> can be
+a basic C type or an STL type like <tt>string</tt>, for instance.  If
+<tt>value_type</tt> is complex, consider storing only the pointer to
+the data in the <tt>sparse_hash_map</tt>.  This will speed up the
+hashtable as well, since hashtable resizes will have to manipulate
+less memory.</p>
+
+
+<h3><A NAME=io>Input/Output</A></h3>
+
+<p>It is possible to save and restore <tt>sparse_hash_map</tt> objects
+to disk.  Storage takes place in two steps.  The first writes the
+hashtable metadata.  The second writes the actual data.</p>
+
+<p>To write a hashtable to disk, first call <tt>write_metadata()</tt>
+on an open file pointer.  This saves the hashtable information in a
+byte-order-independent format.</p>
+
+<p>After the metadata has been written to disk, you must write the
+actual data stored in the hash-map to disk.  If both the key and data
+are "simple" enough, you can do this by calling
+<tt>write_nopointer_data()</tt>.  "Simple" data is data that can be
+safely copied to disk via <tt>fwrite()</tt>.  Native C data types fall
+into this category, as do structs of native C data types.  Pointers
+and STL objects do not.</p>
+
+<p>Note that <tt>write_nopointer_data()</tt> does not do any endian
+conversion.  Thus, it is only appropriate when you intend to read the
+data on the same endian architecture as you write the data.</p>
+
+<p>If you cannot use <tt>write_nopointer_data()</tt> for any reason,
+you can write the data yourself by iterating over the
+<tt>sparse_hash_map</tt> with a <tt>const_iterator</tt> and writing
+the key and data in any manner you wish.</p>
+
+<p>To read the hashtable information from disk, first you must create
+a <tt>sparse_hash_map</tt> object.  Then open a file pointer to point
+to the saved hashtable, and call <tt>read_metadata()</tt>.  If you
+saved the data via <tt>write_nopointer_data()</tt>, you can follow the
+<tt>read_metadata()</tt> call with a call to
+<tt>read_nopointer_data()</tt>.  This is all that is needed.</p>
+
+<p>If you saved the data through a custom write routine, you must call
+a custom read routine to read in the data.  To do this, iterate over
+the <tt>sparse_hash_map</tt> with an <tt>iterator</tt>; this operation
+is sensical because the metadata has already been set up.  For each
+iterator item, you can read the key and value from disk, and set it
+appropriately.  You will need to do a <tt>const_cast</tt> on the
+iterator, since <tt>it-&gt;first</tt> is always <tt>const</tt>.  The
+code might look like this:</p>
+<pre>
+   for (sparse_hash_map&lt;int*, int&gt;::iterator it = ht.begin();
+        it != ht.end(); ++it) {
+       const_cast&lt;int*&gt;(it-&gt;first) = new int;
+       fread(const_cast&lt;int*&gt;(it-&gt;first), sizeof(int), 1, fp);
+       fread(&it-&gt;second, sizeof(int), 1, fp);
+   }
+</pre>
+
+
+<h3><A NAME=iter>Validity of Iterators</A></h3>
+
+<p><tt>insert()</tt> invalidates all iterators, as does
+<tt>resize()</tt>.  <tt>erase()</tt> is guaranteed not to invalidate
+any iterators.</p>
+
+<p>This is implemented by making <tt>erase()</tt> not resize the
+hashtable.  If you desire maximum space efficiency, you can call
+<tt>resize(0)</tt> after a string of <tt>erase()</tt> calls, to force
+the hashtable to resize to the smallest possible size.</p>
+
+
+<h3>See also</h3>
+
+<p>The following are SGI STL concepts and classes related to
+<tt>sparse_hash_map</tt>.</p>
+
+<tt><A href="http://www.sgi.com/tech/stl/hash_map.html">hash_map</A></tt>,
+<A href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative Container</A>,
+<A href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed Associative Container</A>, 
+<A href="http://www.sgi.com/tech/stl/PairAssociativeContainer.html">Pair Associative Container</A>,
+<A href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique Hashed Associative Container</A>, 
+<tt><A href="http://www.sgi.com/tech/stl/set.html">set</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/Map.html">map</A></tt>
+<tt><A href="http://www.sgi.com/tech/stl/multiset.html">multiset</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/Multimap.html">multimap</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/hash_set.html">hash_set</A></tt>, 
+<tt><A href="http://www.sgi.com/tech/stl/hash_multiset.html">hash_multiset</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/hash_multimap.html">hash_multimap</A></tt>,
+<tt><A href="sparsetable.html">sparsetable</A></tt>,
+<tt><A href="sparse_hash_set.html">sparse_hash_set</A></tt>,
+<tt><A href="dense_hash_set.html">dense_hash_set</A></tt>,
+<tt><A href="dense_hash_map.html">dense_hash_map</A></tt>
+
+</BODY>
+</HTML> 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/dense_hash_map.html
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/dense_hash_map.html	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/dense_hash_map.html	(revision 2162)
@@ -0,0 +1,1304 @@
+<HTML>
+<!-- The API of this class and the documentation -- but not the
+     implementation! -- are based on that for SGI's hash_map class:
+  -->
+<!--
+  -- Copyright (c) 1996-1999
+  -- Silicon Graphics Computer Systems, Inc.
+  --
+  -- Permission to use, copy, modify, distribute and sell this software
+  -- and its documentation for any purpose is hereby granted without fee,
+  -- provided that the above copyright notice appears in all copies and
+  -- that both that copyright notice and this permission notice appear
+  -- in supporting documentation.  Silicon Graphics makes no
+  -- representations about the suitability of this software for any
+  -- purpose.  It is provided "as is" without express or implied warranty.
+  --
+  -- Copyright (c) 1994
+  -- Hewlett-Packard Company
+  --
+  -- Permission to use, copy, modify, distribute and sell this software
+  -- and its documentation for any purpose is hereby granted without fee,
+  -- provided that the above copyright notice appears in all copies and
+  -- that both that copyright notice and this permission notice appear
+  -- in supporting documentation.  Hewlett-Packard Company makes no
+  -- representations about the suitability of this software for any
+  -- purpose.  It is provided "as is" without express or implied warranty.
+  --
+  -->
+
+<HEAD>
+<Title>dense_hash_map&lt;Key, Data, HashFcn, EqualKey, Alloc&gt;</Title>
+</HEAD>
+
+<BODY>
+
+<p><i>[Note: this document is formatted similarly to the SGI STL
+implementation documentation pages, and refers to concepts and classes
+defined there.  However, neither this document nor the code it
+describes is associated with SGI, nor is it necessary to have SGI's
+STL implementation installed in order to use this class.]</i></p>
+
+
+<H1>dense_hash_map&lt;Key, Data, HashFcn, EqualKey, Alloc&gt;</H1>
+
+<p><tt>dense_hash_map</tt> is a <A
+href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+Associative Container</A> that associates objects of type <tt>Key</tt>
+with objects of type <tt>Data</tt>.  <tt>dense_hash_map</tt> is a <A
+href="http://www.sgi.com/tech/stl/PairAssociativeContainer.html">Pair
+Associative Container</A>, meaning that its value type is <tt><A
+href="pair.html">pair</A>&lt;const Key, Data&gt;</tt>.  It is also a
+<A
+href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+Associative Container</A>, meaning that no two elements have keys that
+compare equal using <tt>EqualKey</tt>.</p>
+
+<p>Looking up an element in a <tt>dense_hash_map</tt> by its key is
+efficient, so <tt>dense_hash_map</tt> is useful for &quot;dictionaries&quot;
+where the order of elements is irrelevant.  If it is important for the
+elements to be in a particular order, however, then <tt><A
+href="http://www.sgi.com/tech/stl/Map.html">map</A></tt> is more appropriate.</p>
+
+<p><tt>dense_hash_map</tt> is distinguished from other hash-map
+implementations by its speed and by the ability to save
+and restore contents to disk.  On the other hand, this hash-map
+implementation can use significantly more space than other hash-map
+implementations, and it also has requirements -- for instance, for a
+distinguished "empty key" -- that may not be easy for all
+applications to satisfy.</p>
+
+<p>This class is appropriate for applications that need speedy access
+to relatively small "dictionaries" stored in memory, and for
+applications that need these dictionaries to be persistent. <A
+HREF="#io">[implementation note]</A>)</p>
+
+
+<h3>Example</h3>
+
+<pre>
+#include &lt;google/dense_hash_map&gt;
+
+using std::dense_hash_map;      // namespace where class lives by default
+
+struct eqstr
+{
+  bool operator()(const char* s1, const char* s2) const
+  {
+    return strcmp(s1, s2) == 0;
+  }
+};
+
+int main()
+{
+  dense_hash_map&lt;const char*, int, hash&lt;const char*&gt;, eqstr&gt; months;
+  
+  months.set_empty_key(NULL);
+  months[&quot;january&quot;] = 31;
+  months[&quot;february&quot;] = 28;
+  months[&quot;march&quot;] = 31;
+  months[&quot;april&quot;] = 30;
+  months[&quot;may&quot;] = 31;
+  months[&quot;june&quot;] = 30;
+  months[&quot;july&quot;] = 31;
+  months[&quot;august&quot;] = 31;
+  months[&quot;september&quot;] = 30;
+  months[&quot;october&quot;] = 31;
+  months[&quot;november&quot;] = 30;
+  months[&quot;december&quot;] = 31;
+  
+  cout &lt;&lt; &quot;september -&gt; &quot; &lt;&lt; months[&quot;september&quot;] &lt;&lt; endl;
+  cout &lt;&lt; &quot;april     -&gt; &quot; &lt;&lt; months[&quot;april&quot;] &lt;&lt; endl;
+  cout &lt;&lt; &quot;june      -&gt; &quot; &lt;&lt; months[&quot;june&quot;] &lt;&lt; endl;
+  cout &lt;&lt; &quot;november  -&gt; &quot; &lt;&lt; months[&quot;november&quot;] &lt;&lt; endl;
+}
+</pre>
+
+
+<h3>Definition</h3>
+
+Defined in the header <A
+href="dense_hash_map.h">dense_hash_map.h</A>.  This class is not
+part of the C++ standard.
+
+
+<h3>Template parameters</h3>
+
+<table border>
+<TR><TH>Parameter</TH><TH>Description</TH><TH>Default</TH></TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>Key</tt>
+</TD>
+<TD VAlign=top>
+   The hash_map's key type.  This is also defined as
+   <tt>dense_hash_map::key_type</tt>.
+</TD>
+<TD VAlign=top>
+   &nbsp;
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>Data</tt>
+</TD>
+<TD VAlign=top>
+   The hash_map's data type.  This is also defined as
+   <tt>dense_hash_map::data_type</tt>.
+</TD>
+<TD VAlign=top>
+   &nbsp;
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>HashFcn</tt>
+</TD>
+<TD VAlign=top>
+   The <A href="http://www.sgi.com/tech/stl/HashFunction.html">hash function</A> used by the
+   hash_map.  This is also defined as <tt>dense_hash_map::hasher</tt>.  
+   <br><b>Note:</b> Hashtable performance depends heavliy on the choice of
+   hash function.  See <A HREF="performance.html#hashfn">the performance
+   page</A> for more information.
+</TD>
+<TD VAlign=top>
+   <tt><A href="http://www.sgi.com/tech/stl/hash.html">hash</A>&lt;Key&gt;</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>EqualKey</tt>
+</TD>
+<TD VAlign=top>
+   The hash_map key equality function: a <A
+   href="http://www.sgi.com/tech/stl/BinaryPredicate.html">binary predicate</A> that determines
+   whether two keys are equal.  This is also defined as
+   <tt>dense_hash_map::key_equal</tt>.
+</TD>
+<TD VAlign=top>
+   <tt><A href="http://www.sgi.com/tech/stl/equal_to.html">equal_to</A>&lt;Key&gt;</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>Alloc</tt>
+</TD>
+<TD VAlign=top>
+   <b>Ignored</b>; this is included only for API-compatibility
+   with SGI's STL implementation.
+</TD>
+<TD VAlign=top>
+    <tt><A href="http://www.sgi.com/tech/stl/Allocators.html">alloc</A></tt>
+</TD>
+</TR>
+
+</table>
+
+
+<h3>Model of</h3>
+
+<A href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique Hashed Associative Container</A>,
+<A href="http://www.sgi.com/tech/stl/PairAssociativeContainer.html">Pair Associative Container</A>
+
+
+<h3>Type requirements</h3>
+
+<UL>
+<LI>
+<tt>Key</tt> is Assignable.
+<LI>
+<tt>EqualKey</tt> is a Binary Predicate whose argument type is Key.
+<LI>
+<tt>EqualKey</tt> is an equivalence relation.
+<LI>
+<tt>Alloc</tt> is an Allocator.
+</UL>
+
+
+<h3>Public base classes</h3>
+
+None.
+
+
+<h3>Members</h3>
+
+<table border>
+<TR><TH>Member</TH><TH>Where defined</TH><TH>Description</TH></TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>key_type</tt> <A href="#7">[7]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   The <tt>dense_hash_map</tt>'s key type, <tt>Key</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>data_type</tt> <A href="#7">[7]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/PairAssociativeContainer.html">Pair
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   The type of object associated with the keys.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>value_type</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/PairAssociativeContainer.html">Pair
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   The type of object, <tt>pair&lt;const key_type, data_type&gt;</tt>,
+   stored in the hash_map.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>hasher</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   The <tt>dense_hash_map</tt>'s <A
+   href="http://www.sgi.com/tech/stl/HashFunction.html">hash
+   function</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>key_equal</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/functors.html">Function
+    object</A> that compares keys for equality.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>pointer</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Pointer to <tt>T</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reference</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Reference to <tt>T</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reference</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Const reference to <tt>T</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   An unsigned integral type.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>difference_type</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   A signed integral type.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Iterator used to iterate through a <tt>dense_hash_map</tt>. <A
+   href="#1">[1]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_iterator</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Const iterator used to iterate through a <tt>dense_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator begin()</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>iterator</tt> pointing to the beginning of the
+   <tt>dense_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator end()</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>iterator</tt> pointing to the end of the
+   <tt>dense_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_iterator begin() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>const_iterator</tt> pointing to the beginning of the
+   <tt>dense_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_iterator end() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>const_iterator</tt> pointing to the end of the
+   <tt>dense_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type size() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the size of the <tt>dense_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type max_size() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the largest possible size of the <tt>dense_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool empty() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   <tt>true</tt> if the <tt>dense_hash_map</tt>'s size is <tt>0</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type bucket_count() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the number of buckets used by the <tt>dense_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type max_bucket_count() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the largest possible number of buckets used by the <tt>dense_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void resize(size_type n)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Increases the bucket count to at least <tt>n</tt>.
+   <A href="#4">[4]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>hasher hash_funct() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the <tt>hasher</tt> object used by the <tt>dense_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>key_equal key_eq() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the <tt>key_equal</tt> object used by the
+   <tt>dense_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>dense_hash_map()</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>dense_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>dense_hash_map(size_type n)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>dense_hash_map</tt> that's optimized for holding
+   up to <tt>n</tt> items.
+   <A href="#5">[5]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>dense_hash_map(size_type n, const hasher&amp; h)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>dense_hash_map</tt> that's optimized for up
+   to <tt>n</tt> items, using <tt>h</tt> as the hash function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>dense_hash_map(size_type n, const hasher&amp; h, const
+   key_equal&amp; k)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>dense_hash_map</tt> that's optimized for up
+   to <tt>n</tt> items, using <tt>h</tt> as the hash function and
+   <tt>k</tt> as the key equal function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+dense_hash_map(InputIterator f, InputIterator l) </pre>
+<A href="#2">[2]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a dense_hash_map with a copy of a range.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+dense_hash_map(InputIterator f, InputIterator l, size_type n) </pre>
+<A href="#2">[2]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a hash_map with a copy of a range that's optimized to
+   hold up to <tt>n</tt> items.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+dense_hash_map(InputIterator f, InputIterator l, size_type n, const
+hasher&amp; h) </pre> <A href="#2">[2]</A> 
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a hash_map with a copy of a range that's optimized to hold
+   up to <tt>n</tt> items, using <tt>h</tt> as the hash function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+dense_hash_map(InputIterator f, InputIterator l, size_type n, const
+hasher&amp; h, const key_equal&amp; k) </pre> <A href="#2">[2]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a hash_map with a copy of a range that's optimized for
+   holding up to <tt>n</tt> items, using <tt>h</tt> as the hash
+   function and <tt>k</tt> as the key equal function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>dense_hash_map(const hash_map&amp;)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   The copy constructor.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>dense_hash_map&amp; operator=(const hash_map&amp;)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   The assignment operator
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void swap(hash_map&amp;)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Swaps the contents of two hash_maps.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>pair&lt;iterator, bool&gt; insert(const value_type&amp; x)
+</pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Inserts <tt>x</tt> into the <tt>dense_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+void insert(InputIterator f, InputIterator l) </pre> <A href="#2">[2]</A> 
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Inserts a range into the <tt>dense_hash_map</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void set_empty_key(const key_type& key)</tt> <A href="#6">[6]</A>
+</TD>
+<TD VAlign=top>
+   <tt>dense_hash_map</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void set_deleted_key(const key_type& key)</tt> <A href="#6">[6]</A>
+</TD>
+<TD VAlign=top>
+   <tt>dense_hash_map</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void clear_deleted_key()</tt> <A href="#6">[6]</A>
+</TD>
+<TD VAlign=top>
+   <tt>dense_hash_map</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void erase(iterator pos)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases the element pointed to by <tt>pos</tt>.
+   <A href="#6">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type erase(const key_type&amp; k)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases the element whose key is <tt>k</tt>.
+   <A href="#6">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void erase(iterator first, iterator last)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases all elements in a range.
+   <A href="#6">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void clear()</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases all of the elements.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_iterator find(const key_type&amp; k) const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Finds an element whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator find(const key_type&amp; k)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Finds an element whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type count(const key_type&amp; k) const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Counts the number of elements whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>pair&lt;const_iterator, const_iterator&gt; equal_range(const
+key_type&amp; k) const </pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Finds a range containing all elements whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>pair&lt;iterator, iterator&gt; equal_range(const
+key_type&amp; k) </pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Finds a range containing all elements whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>data_type&amp; operator[](const key_type&amp; k) <A
+   href="http://www.sgi.com/tech/stl/#3">[3]</A> </pre>
+</TD>
+<TD VAlign=top>
+   <tt>dense_hash_map</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>dense_hash_map</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>dense_hash_map</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>dense_hash_map</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>dense_hash_map</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>bool operator==(const hash_map&amp;, const hash_map&amp;)
+</pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Tests two hash_maps for equality.  This is a global function, not a
+   member function.
+</TD>
+</TR>
+
+</table>
+
+
+<h3>New members</h3>
+
+These members are not defined in the <A
+href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+Hashed Associative Container</A> and <A
+href="http://www.sgi.com/tech/stl/PairAssociativeContainer.html">Pair
+Associative Container</A> requirements, but are specific to
+<tt>dense_hash_map</tt>.
+
+<table border>
+<TR><TH>Member</TH><TH>Description</TH></TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void set_empty_key(const key_type& key)</tt>
+</TD>
+<TD VAlign=top>
+   Sets the distinguished "empty" key to <tt>key</tt>.  This must be
+   called immediately after construct time, before calls to another
+   other <tt>dense_hash_map</tt> operation. <A href="#6">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void set_deleted_key(const key_type& key)</tt>
+</TD>
+<TD VAlign=top>
+   Sets the distinguished "deleted" key to <tt>key</tt>.  This must be
+   called before any calls to <tt>erase()</tt>. <A href="#6">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void clear_deleted_key()</tt> <A href="#6">[6]</A>
+</TD>
+<TD VAlign=top>
+   Clears the distinguished "deleted" key.  After this is called,
+   calls to <tt>erase()</tt> are not valid on this object.
+   <A href="#6">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>
+   data_type&amp; 
+   operator[](const key_type&amp; k) <A
+   href="http://www.sgi.com/tech/stl/#3">[3]</A>
+</pre>
+</TD>
+<TD VAlign=top>
+   Returns a reference to the object that is associated with
+   a particular key.  If the <tt>dense_hash_map</tt> does not already
+   contain such an object, <tt>operator[]</tt> inserts the default
+   object <tt>data_type()</tt>. <A
+   href="http://www.sgi.com/tech/stl/#3">[3]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Write hashtable metadata to <tt>fp</tt>.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Read hashtable metadata from <tt>fp</tt>.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Write hashtable contents to <tt>fp</tt>.  This is valid only if the
+   hashtable key and value are "plain" data.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Read hashtable contents to <tt>fp</tt>.  This is valid only if the
+   hashtable key and value are "plain" data.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+</table>
+
+
+<h3>Notes</h3>
+
+<P><A name="1">[1]</A>
+
+<tt>dense_hash_map::iterator</tt> is not a mutable iterator, because
+<tt>dense_hash_map::value_type</tt> is not <A
+href="http://www.sgi.com/tech/stl/Assignable.html">Assignable</A>.
+That is, if <tt>i</tt> is of type <tt>dense_hash_map::iterator</tt>
+and <tt>p</tt> is of type <tt>dense_hash_map::value_type</tt>, then
+<tt>*i = p</tt> is not a valid expression.  However,
+<tt>dense_hash_map::iterator</tt> isn't a constant iterator either,
+because it can be used to modify the object that it points to.  Using
+the same notation as above, <tt>(*i).second = p</tt> is a valid
+expression.</p>
+
+<P><A name="2">[2]</A>
+
+This member function relies on <i>member template</i> functions, which
+may not be supported by all compilers.  If your compiler supports
+member templates, you can call this function with any type of <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">input
+iterator</A>.  If your compiler does not yet support member templates,
+though, then the arguments must either be of type <tt>const
+value_type*</tt> or of type <tt>dense_hash_map::const_iterator</tt>.</p>
+
+<P><A name="3">[3]</A>
+
+Since <tt>operator[]</tt> might insert a new element into the
+<tt>dense_hash_map</tt>, it can't possibly be a <tt>const</tt> member
+function.  Note that the definition of <tt>operator[]</tt> is
+extremely simple: <tt>m[k]</tt> is equivalent to
+<tt>(*((m.insert(value_type(k, data_type()))).first)).second</tt>.
+Strictly speaking, this member function is unnecessary: it exists only
+for convenience.</p>
+
+<P><A name="4">[4]</A>
+
+In order to preserve iterators, erasing hashtable elements does not
+cause a hashtable to resize.  This means that after a string of
+<tt>erase()</tt> calls, the hashtable will use more space than is
+required.  At a cost of invalidating all current iterators, you can
+call <tt>resize()</tt> to manually compact the hashtable.  The
+hashtable promotes too-small <tt>resize()</tt> arguments to the
+smallest legal value, so to compact a hashtable, it's sufficient to
+call <tt>resize(0)</tt>.
+
+<P><A name="5">[5]</A>
+
+Unlike some other hashtable implementations, the optional <i>n</i> in
+the constructor size indicates not the desired number of buckets that
+should be allocated, but instead the expected number of items to be
+inserted.  The class then sizes the hash-map appropriately for the
+number of items specified.  It's not an error to actually insert more
+or fewer items into the hashtable, but the implementation is most
+efficient -- does the fewest hashtable resizes -- if the number of
+inserted items is close to <i>n</i>.</p>
+
+<P><A name="6">[6]</A>
+
+<tt>dense_hash_map</tt> <b>requires</b> you call
+<tt>set_empty_key()</tt> immediately after constructing the hash-map,
+and before calling any other <tt>dense_hash_map</tt> method.  (This is
+the largest difference between the <tt>dense_hash_map</tt> API and
+other hash-map APIs.  See <A HREF="implementation.html">implementation.html</A>
+for why this is necessary.)
+The argument to <tt>set_empty_key()</tt> should be a key-value that
+is never used for legitimate hash-map entries.  If you have no such
+key value, you will be unable to use <tt>dense_hash_map</tt>.  It is
+an error to call <tt>insert()</tt> with an item whose key is the
+"empty key."</p>
+
+<tt>dense_hash_map</tt> also requires you call
+<tt>set_deleted_key()</tt> before calling <tt>erase()</tt>.
+The argument to <tt>set_deleted_key()</tt> should be a key-value that
+is never used for legitimate hash-map entries.  It must be different
+from the key-value used for <tt>set_empty_key()</tt>.  It is an error to call
+<tt>erase()</tt> without first calling <tt>set_deleted_key()</tt>, and
+it is also an error to call <tt>insert()</tt> with an item whose key
+is the "deleted key."</p>
+
+<p>There is no need to call <tt>set_deleted_key</tt> if you do not
+wish to call <tt>erase()</tt> on the hash-map.</p>
+
+<p>It is acceptable to change the deleted-key at any time by calling
+<tt>set_deleted_key()</tt> with a new argument.  You can also call
+<tt>clear_deleted_key()</tt>, at which point all keys become valid for
+insertion but no hashtable entries can be deleted until
+<tt>set_deleted_key()</tt> is called again.</p>
+
+<P><A name="7">[7]</A>
+
+Both <tt>key_type</tt> and <tt>data_type</tt> must be <A
+HREF="http://c2.com/cgi/wiki?PlainOldData">plain old data</A> (see
+<A HREF="implementation.html">implementation.html</A> for why this is
+necessary).  In addition, there should
+be no data structures that point directly into parts of key or value,
+including the key or value itself (for instance, you cannot have a
+value like <tt>struct {int a = 1, *b = &a}</tt>.  This is because
+<tt>dense_hash_map</tt> uses <tt>malloc()</tt> and <tt>free()</tt> to
+allocate space for the key and value, and <tt>memmove()</tt> to
+reorganize the key and value in memory.</p>
+
+<p>Almost all common uses fit this criterion: <tt>key_type</tt> can be
+a basic C type or an STL type like <tt>string</tt>, for instance.  If
+<tt>value_type</tt> is complex, consider storing only the pointer to
+the data in the <tt>dense_hash_map</tt>.  This will speed up the
+hashtable as well, since hashtable resizes will have to manipulate
+less memory.</p>
+
+
+<h3><A NAME=io>Input/Output</A></h3>
+
+<table border=1 cellpadding=5><tr><td>
+<p><b>IMPORTANT IMPLEMENTATION NOTE:</b> In the current version of
+this code, the input/output routines for <tt>dense_hash_map</tt> have
+<b>not yet been implemented</b>.  This section explains the API, but
+note that all calls to these routines will fail (return
+<tt>false</tt>).  It is a TODO to remedy this situation.</p>
+</td></tr></table>
+
+<p>It is possible to save and restore <tt>dense_hash_map</tt> objects
+to disk.  Storage takes place in two steps.  The first writes the
+hashtable metadata.  The second writes the actual data.</p>
+
+<p>To write a hashtable to disk, first call <tt>write_metadata()</tt>
+on an open file pointer.  This saves the hashtable information in a
+byte-order-independent format.</p>
+
+<p>After the metadata has been written to disk, you must write the
+actual data stored in the hash-map to disk.  If both the key and data
+are "simple" enough, you can do this by calling
+<tt>write_nopointer_data()</tt>.  "Simple" data is data that can be
+safely copied to disk via <tt>fwrite()</tt>.  Native C data types fall
+into this category, as do structs of native C data types.  Pointers
+and STL objects do not.</p>
+
+<p>Note that <tt>write_nopointer_data()</tt> does not do any endian
+conversion.  Thus, it is only appropriate when you intend to read the
+data on the same endian architecture as you write the data.</p>
+
+<p>If you cannot use <tt>write_nopointer_data()</tt> for any reason,
+you can write the data yourself by iterating over the
+<tt>dense_hash_map</tt> with a <tt>const_iterator</tt> and writing
+the key and data in any manner you wish.</p>
+
+<p>To read the hashtable information from disk, first you must create
+a <tt>dense_hash_map</tt> object.  Then open a file pointer to point
+to the saved hashtable, and call <tt>read_metadata()</tt>.  If you
+saved the data via <tt>write_nopointer_data()</tt>, you can follow the
+<tt>read_metadata()</tt> call with a call to
+<tt>read_nopointer_data()</tt>.  This is all that is needed.</p>
+
+<p>If you saved the data through a custom write routine, you must call
+a custom read routine to read in the data.  To do this, iterate over
+the <tt>dense_hash_map</tt> with an <tt>iterator</tt>; this operation
+is sensical because the metadata has already been set up.  For each
+iterator item, you can read the key and value from disk, and set it
+appropriately.  You will need to do a <tt>const_cast</tt> on the
+iterator, since <tt>it-&gt;first</tt> is always <tt>const</tt>.  The
+code might look like this:</p>
+<pre>
+   for (dense_hash_map&lt;int*, int&gt;::iterator it = ht.begin();
+        it != ht.end(); ++it) {
+       const_cast&lt;int*&gt;(it-&gt;first) = new int;
+       fread(const_cast&lt;int*&gt;(it-&gt;first), sizeof(int), 1, fp);
+       fread(&it-&gt;second, sizeof(int), 1, fp);
+   }
+</pre>
+
+
+<h3><A NAME=iter>Validity of Iterators</A></h3>
+
+<p><tt>insert()</tt> invalidates all iterators, as does
+<tt>resize()</tt>.  <tt>erase()</tt> is guaranteed not to invalidate
+any iterators.</p>
+
+<p>This is implemented by making <tt>erase()</tt> not resize the
+hashtable.  If you desire maximum space efficiency, you can call
+<tt>resize(0)</tt> after a string of <tt>erase()</tt> calls, to force
+the hashtable to resize to the smallest possible size.</p>
+
+
+<h3>See also</h3>
+
+<p>The following are SGI STL concepts and classes related to
+<tt>dense_hash_map</tt>.</p>
+
+<tt><A href="http://www.sgi.com/tech/stl/hash_map.html">hash_map</A></tt>,
+<A href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative Container</A>,
+<A href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed Associative Container</A>, 
+<A href="http://www.sgi.com/tech/stl/PairAssociativeContainer.html">Pair Associative Container</A>,
+<A href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique Hashed Associative Container</A>, 
+<tt><A href="http://www.sgi.com/tech/stl/set.html">set</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/Map.html">map</A></tt>
+<tt><A href="http://www.sgi.com/tech/stl/multiset.html">multiset</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/Multimap.html">multimap</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/hash_set.html">hash_set</A></tt>, 
+<tt><A href="http://www.sgi.com/tech/stl/hash_multiset.html">hash_multiset</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/hash_multimap.html">hash_multimap</A></tt>,
+<tt><A href="sparse_hash_set.html">sparse_hash_set</A></tt>,
+<tt><A href="sparse_hash_map.html">sparse_hash_map</A></tt>,
+<tt><A href="dense_hash_set.html">dense_hash_set</A></tt>
+
+</BODY>
+</HTML> 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/performance.html
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/performance.html	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/performance.html	(revision 2162)
@@ -0,0 +1,95 @@
+<HTML>
+
+<HEAD>
+<title>Performance notes: sparse_hash, dense_hash, sparsetable</title>
+</HEAD>
+
+<BODY>
+
+<H2>Performance Numbers</H2>
+
+<p>Here are some performance numbers from an example desktop machine,
+taken from a version of time_hash_map that was instrumented to also
+report memory allocation information (this modification is not
+included by default because it required a big hack to do, including
+modifying the STL code to not try to do its own freelist management).</p>
+
+<p>Note there are lots of caveats on these numbers: they may differ from
+machine to machine and compiler to compiler, and they only test a very
+particular usage pattern that may not match how you use hashtables --
+for instance, they test hashtables with very small keys.  However,
+they're still useful for a baseline comparison of the various
+hashtable implementations.</p>
+
+<p>These figures are from a 2.80GHz Pentium 4 with 2G of memory.  The
+'standard' hash_map and map implementations are the SGI STL code
+included with <tt>gcc2</tt>.  Compiled with <tt>gcc2.95.3 -g
+-O2</tt></p>
+
+<pre>
+======
+Average over 10000000 iterations
+Wed Dec  8 14:56:38 PST 2004
+
+SPARSE_HASH_MAP:
+map_grow                  665 ns
+map_predict/grow          303 ns
+map_replace               177 ns
+map_fetch                 117 ns
+map_remove                192 ns
+memory used in map_grow    84.3956 Mbytes
+
+DENSE_HASH_MAP:
+map_grow                   84 ns
+map_predict/grow           22 ns
+map_replace                18 ns
+map_fetch                  13 ns
+map_remove                 23 ns
+memory used in map_grow   256.0000 Mbytes
+
+STANDARD HASH_MAP:
+map_grow                  162 ns
+map_predict/grow          107 ns
+map_replace                44 ns
+map_fetch                  22 ns
+map_remove                124 ns
+memory used in map_grow   204.1643 Mbytes
+
+STANDARD MAP:
+map_grow                  297 ns
+map_predict/grow          282 ns
+map_replace               113 ns
+map_fetch                 113 ns
+map_remove                238 ns
+memory used in map_grow   236.8081 Mbytes
+</pre>
+
+
+<H2><A name="hashfn">A Note on Hash Functions</A></H2>
+
+<p>For good performance, the Google hash routines depend on a good
+hash function: one that distributes data evenly.  Many hashtable
+implementations come with sub-optimal hash functions that can degrade
+performance.  For instance, the hash function given in Knuth's _Art of
+Computer Programming_, and the default string hash function in SGI's
+STL implementation, both distribute certain data sets unevenly,
+leading to poor performance.</p>
+
+<p>As an example, in one test of the default SGI STL string hash
+function against the Hsieh hash function (see below), for a particular
+set of string keys, the Hsieh function resulted in hashtable lookups
+that were 20 times as fast as the STLPort hash function.  The string
+keys were chosen to be "hard" to hash well, so these results may not
+be typical, but they are suggestive.</p>
+
+<p>There has been much research over the years into good hash
+functions.  Here are some hash functions of note.</p>
+
+<ul>
+  <li> Bob Jenkins: <A HREF="http://burtleburtle.net/bob/hash/">http://burtleburtle.net/bob/hash/</A>
+  <li> Paul Hsieh: <A HREF="http://www.azillionmonkeys.com/qed/hash.html">http://www.azillionmonkeys.com/qed/hash.html</A>
+  <li> Fowler/Noll/Vo (FNV): <A HREF="http://www.isthe.com/chongo/tech/comp/fnv/">http://www.isthe.com/chongo/tech/comp/fnv/</A>
+</ul>
+
+</body>
+</html>
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/implementation.html
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/implementation.html	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/implementation.html	(revision 2162)
@@ -0,0 +1,374 @@
+<HTML>
+
+<HEAD>
+<title>Implementation notes: sparse_hash, dense_hash, sparsetable</title>
+</HEAD>
+
+<BODY>
+
+<h1>Implementation of sparse_hash_map, dense_hash_map, and
+sparsetable</h1>
+
+This document contains a few notes on how the data structures in this
+package are implemented.  This discussion refers at several points to
+the classic text in this area: Knuth, <i>The Art of Computer
+Programming</i>, Vol 3, Hashing.
+
+
+<hr>
+<h2><tt>sparsetable</tt></h2>
+
+<p>For specificity, consider the declaration </p>
+
+<pre>
+   sparsetable&lt;Foo&gt; t(100);        // a sparse array with 100 elements
+</pre>
+
+<p>A sparsetable is a random container that implements a sparse array,
+that is, an array that uses very little memory to store unassigned
+indices (in this case, between 1-2 bits per unassigned index).  For
+instance, if you allocate an array of size 5 and assign a[2] = [big
+struct], then a[2] will take up a lot of memory but a[0], a[1], a[3],
+and a[4] will not.  Array elements that have a value are called
+"assigned".  Array elements that have no value yet, or have had their
+value cleared using erase() or clear(), are called "unassigned".
+For assigned elements, lookups return the assigned value; for
+unassigned elements, they return the default value, which for t is
+Foo().</p>
+
+<p>sparsetable is implemented as an array of "groups".  Each group is
+responsible for M array indices.  The first group knows about
+t[0]..t[M-1], the second about t[M]..t[2M-1], and so forth.  (M is 48
+by default.)  At construct time, t creates an array of (99/M + 1)
+groups.  From this point on, all operations -- insert, delete, lookup
+-- are passed to the appropriate group.  In particular, any operation
+on t[i] is actually performed on (t.group[i / M])[i % M].</p>
+
+<p>Each group contains of a vector, which holds assigned values, and a
+bitmap of size M, which indicates which indices are assigned.  A
+lookup works as follows: the group is asked to look up index i, where
+i &lt; M.  The group looks at bitmap[i].  If it's 0, the lookup fails.
+If it's 1, then the group has to find the appropriate value in the
+vector.</p>
+
+<h3><tt>find()</tt></h3>
+
+<p>Finding the appropriate vector element is the most expensive part of
+the lookup.  The code counts all bitmap entries &lt;= i that are set to
+1.  (There's at least 1 of them, since bitmap[i] is 1.)  Suppose there
+are 4 such entries.  Then the right value to return is the 4th element
+of the vector: vector[3].  This takes time O(M), which is a constant
+since M is a constant.</p>
+
+<h3><tt>insert()</tt></h3>
+
+<p>Insert starts with a lookup.  If the lookup succeeds, the code merely
+replaces vector[3] with the new value.  If the lookup fails, then the
+code must insert a new entry into the middle of the vector.  Again, to
+insert at position i, the code must count all the bitmap entries &lt;= i
+that are set to i.  This indicates the position to insert into the
+vector.  All vector entries above that position must be moved to make
+room for the new entry.  This takes time, but still constant time
+since the vector has size at most M.</p>
+
+<p>(Inserts could be made faster by using a list instead of a vector to
+hold group values, but this would use much more memory, since each
+list element requires a full pointer of overhead.)</p>
+
+<p>The only metadata that needs to be updated, after the actual value is
+inserted, is to set bitmap[i] to 1.  No other counts must be
+maintained.</p>
+
+<h3><tt>delete()</tt></h3>
+
+<p>Deletes are similar to inserts.  They start with a lookup.  If it
+fails, the delete is a noop.  Otherwise, the appropriate entry is
+removed from the vector, all the vector elements above it are moved
+down one, and bitmap[i] is set to 0.</p>
+
+<p>Currently, the code uses memmove() to move vector elements around when
+making space for inserts and deletes.  This is why the value stored in
+a sparsetable must be Plain Old Data.  This requirement is easy to
+remove, though it may come at a speed cost.</p>
+
+<h3>iterators</h3>
+
+<p>Sparsetable iterators pose a special burden.  They must iterate over
+unassigned array values, but the act of iterating should not cause an
+assignment to happen -- otherwise, iterating over a sparsetable would
+cause it to take up much more room.  For const iterators, the matter
+is simple: the iterator is merely programmed to return the default
+value -- Foo() -- when dereferenced while pointing to an unassigned
+entry.</p>
+
+<p>For non-const iterators, such simple techniques fail.  Instead,
+dereferencing a sparsetable_iterator returns an opaque object that
+acts like a Foo in almost all situations, but isn't actually a Foo.
+(It does this by defining operator=(), operator value_type(), and,
+most sneakily, operator&().)  This works in almost all cases.  If it
+doesn't, an explicit cast to value_type will solve the problem:</p>
+
+<pre>
+   printf("%d", static_cast&lt;Foo&gt;(*t.find(0)));
+</pre>
+
+<p>To avoid such problems, consider using get() and set() instead of an
+iterator:</p>
+
+<pre>
+   for (int i = 0; i &lt; t.size(); ++i)
+      if (t.get(i) == ...)  t.set(i, ...);
+</pre>
+
+<p>Sparsetable also has a special class of iterator, besides normal and
+const: nonempty_iterator.  This only iterates over array values that
+are assigned.  This is particularly fast given the sparsetable
+implementation, since it can ignore the bitmaps entirely and just
+iterate over the various group vectors.</p>
+
+<h3>Resource use</h3>
+
+<p>The space overhead for an sparsetable of size N is N + 48N/M bits.
+For the default value of M, this is exactly 2 bits per array entry.
+A larger M would use less overhead -- approaching 1 bit per array
+entry -- but take longer for inserts, deletes, and lookups.  A smaller
+M would use more overhead but make operations somewhat faster.</p>
+
+<p>You can also look at some specific <A
+HREF="performance.html">performance numbers</A>.</p>
+
+
+<hr>
+<h2><tt>sparse_hash_set</tt></h2>
+
+<p>For specificity, consider the declaration </p>
+
+<pre>
+   sparse_hash_set&lt;Foo&gt; t;           // Foo is a Plain Old Data type.
+</pre>
+
+<p>sparse_hash_set is a hashtable.  For more information on hashtables,
+see Knuth.  Hashtables are basically arrays with complicated logic on
+top of them.  sparse_hash_set uses a sparsetable to implement the
+underlying array.</p>
+
+<p>In particular, sparse_hash_set stores its data in a sparsetable using
+quadratic internal probing (see Knuth).  Many hashtable
+implementations use external probing, so each table element is
+actually a pointer chain, holding many hashtable values.
+sparse_hash_set, on the other hand, always stores at most one value in
+each table location.  If the hashtable wants to store a second value
+at a given table location, it can't; it's forced to look somewhere
+else.</p>
+
+<h3><tt>insert()</tt></h3>
+
+<p>As a specific example, suppose t is a new sparse_hash_set.  It then
+holds a sparsetable of size 32.  The code for t.insert(foo) works as
+follows:</p>
+
+<p>
+1) Call hash&lt;Foo&gt;(foo) to convert foo into an integer i.  (hash&lt;Foo&gt; is
+   the default hash function; you can specify a different one in the
+   template arguments.)
+
+</p><p>
+2a) Look at t.sparsetable[i % 32].  If it's unassigned, assign it to
+    foo.  foo is now in the hashtable.
+
+</p><p>
+2b) If t.sparsetable[i % 32] is assigned, and its value is foo, then
+    do nothing: foo was already in t and the insert is a noop.
+
+</p><p>
+2c) If t.sparsetable[i % 32] is assigned, but to a value other than
+    foo, look at t.sparsetable[(i+1) % 32].  If that also fails, try
+    t.sparsetable[(i+3) % 32], then t.sparsetable[(i+6) % 32].  In
+    general, keep trying the next triangular number.
+
+</p><p>
+3) If the table is now "too full" -- say, 25 of the 32 table entries
+   are now assigned -- grow the table by creating a new sparsetable
+   that's twice as big, and rehashing every single element from the
+   old table into the new one.  This keeps the table from ever filling
+   up.
+
+</p><p>
+4) If the table is now "too empty" -- say, only 3 of the 32 table
+   entries are now assigned -- shrink the table by creating a new
+   sparsetable that's half as big, and rehashing every element as in
+   the growing case.  This keeps the table overhead proportional to
+   the number of elements in the table.
+</p>
+
+<p>Instead of using triangular numbers as offsets, one could just use
+regular integers: try i, then i+1, then i+2, then i+3.  This has bad
+'clumping' behavior, as explored in Knuth.  Quadratic probing, using
+the triangular numbers, avoids the clumping while keeping cache
+coherency in the common case.  As long as the table size is a power of
+2, the quadratic-probing method described above will explore every
+table element if necessary, to find a good place to insert.</p>
+
+<p>(As a side note, using a table size that's a power of two has several
+advantages, including the speed of calculating (i % table_size).  On
+the other hand, power-of-two tables are not very forgiving of a poor
+hash function.  Make sure your hash function is a good one!  There are
+plenty of dos and don'ts on the web (and in Knuth), for writing hash
+functions.)</p>
+
+<p>The "too full" value, also called the "maximum occupancy", determines
+a time-space tradeoff: in general, the higher it is, the less space is
+wasted but the more probes must be performed for each insert.
+sparse_hash_set uses a high maximum occupancy, since space is more
+important than speed for this data structure.</p>
+
+<p>The "too empty" value is not necessary for performance but helps with
+space use.  It's rare for hashtable implementations to check this
+value at insert() time -- after all, how will inserting cause a
+hashtable to get too small?  However, the sparse_hash_set
+implementation never resizes on erase(); it's nice to have an erase()
+that does not invalidate iterators.  Thus, the first insert() after a
+long string of erase()s could well trigger a hashtable shrink.</p>
+
+<h3><tt>find()</tt></h3>
+
+<p>find() works similarly to insert.  The only difference is in step
+(2a): if the value is unassigned, then the lookup fails immediately.</p>
+
+<h3><tt>delete()</tt></h3>
+
+<p>delete() is tricky in an internal-probing scheme.  The obvious
+implementation of just "unassigning" the relevant table entry doesn't
+work.  Consider the following scenario:</p>
+
+<pre>
+    t.insert(foo1);         // foo1 hashes to 4, is put in table[4]
+    t.insert(foo2);         // foo2 hashes to 4, is put in table[5]
+    t.erase(foo1);          // table[4] is now 'unassigned'
+    t.lookup(foo2);         // fails since table[hash(foo2)] is unassigned
+</pre>
+
+<p>To avoid these failure situations, delete(foo1) is actually
+implemented by replacing foo1 by a special 'delete' value in the
+hashtable.  This 'delete' value causes the table entry to be
+considered unassigned for the purposes of insertion -- if foo3 hashes
+to 4 as well, it can go into table[4] no problem -- but assigned for
+the purposes of lookup.</p>
+
+<p>What is this special 'delete' value?  The delete value has to be an
+element of type Foo, since the table can't hold anything else.  It
+obviously must be an element the client would never want to insert on
+its own, or else the code couldn't distinguish deleted entries from
+'real' entries with the same value.  There's no way to determine a
+good value automatically.  The client has to specify it explicitly.
+This is what the set_deleted_key() method does.</p>
+
+<p>Note that set_deleted_key() is only necessary if the client actually
+wants to call t.erase().  For insert-only hash-sets, set_deleted_key()
+is unnecessary.</p>
+
+<p>When copying the hashtable, either to grow it or shrink it, the
+special 'delete' values are <b>not</b> copied into the new table.  The
+copy-time rehash makes them unnecessary.</p>
+
+<h3>Resource use</h3>
+
+<p>The data is stored in a sparsetable, so space use is the same as
+for sparsetable.  Time use is also determined in large part by the
+sparsetable implementation.  However, there is also an extra probing
+cost in hashtables, which depends in large part on the "too full"
+value.  It should be rare to need more than 4-5 probes per lookup, and
+usually significantly less will suffice.</p>
+
+<p>A note on growing and shrinking the hashtable: all hashtable
+implementations use the most memory when growing a hashtable, since
+they must have room for both the old table and the new table at the
+same time.  sparse_hash_set is careful to delete entries from the old
+hashtable as soon as they're copied into the new one, to minimize this
+space overhead.  (It does this efficiently by using its knowledge of
+the sparsetable class and copying one sparsetable group at a time.)</p>
+
+<p>You can also look at some specific <A
+HREF="performance.html">performance numbers</A>.</p>
+
+
+<hr>
+<h2><tt>sparse_hash_map</tt></h2>
+
+<p>sparse_hash_map is implemented identically to sparse_hash_set.  The
+only difference is instead of storing just Foo in each table entry,
+the data structure stores pair&lt;Foo, Value&gt;.</p>
+
+
+<hr>
+<h2><tt>dense_hash_set</tt></h2>
+
+<p>The hashtable aspects of dense_hash_set are identical to
+sparse_hash_set: it uses quadratic internal probing, and resizes
+hashtables in exactly the same way.  The difference is in the
+underlying array: instead of using a sparsetable, dense_hash_set uses
+a C array.  This means much more space is used, especially if Foo is
+big.  However, it makes all operations faster, since sparsetable has
+memory management overhead that C arrays do not.</p>
+
+<p>The use of C arrays instead of sparsetables points to one immediate
+complication dense_hash_set has that sparse_hash_set does not: the
+need to distinguish assigned from unassigned entries.  In a
+sparsetable, this is accomplished by a bitmap.  dense_hash_set, on the
+other hand, uses a dedicated value to specify unassigned entries.
+Thus, dense_hash_set has two special values: one to indicate deleted
+table entries, and one to indicated unassigned table entries.  At
+construct time, all table entries are initialized to 'unassigned'.</p>
+
+<p>dense_hash_set provides the method set_empty_key() to indicate the
+value that should be used for unassigned entries.  Like
+set_deleted_key(), set_empty_key() requires a value that will not be
+used by the client for any legitimate purpose.  Unlike
+set_deleted_key(), set_empty_key() is always required, no matter what
+hashtable operations the client wishes to perform.</p>
+
+<p>Since this implementation uses C arrays rather than an equivalent C++
+data structure like vectors, data in it must have a Plain Old Data
+type.  This restriction is probably easy to remove -- using a vector
+instead of an array would probably work fine -- but it has not been
+done.</p>
+
+<h3>Resource use</h3>
+
+<p>This implementation is fast because even though dense_hash_set may not
+be space efficient, most lookups are localized: a single lookup may
+need to access table[i], and maybe table[i+1] and table[i+3], but
+nothing other than that.  For all but the biggest data structures,
+these will frequently be in a single cache line.</p>
+
+<p>This implementation takes, for every unused bucket, space as big as
+the key-type.  Usually between half and two-thirds of the buckets are
+empty.</p>
+
+<p>The doubling method used by dense_hash_set tends to work poorly
+with most memory allocators.  This is because memory allocators tend
+to have memory 'buckets' which are a power of two.  Since each
+doubling of a dense_hash_set doubles the memory use, a single
+hashtable doubling will require a new memory 'bucket' from the memory
+allocator, leaving the old bucket stranded as fragmented memory.
+Hence, it's not recommended this data structure be used with many
+inserts in memory-constrained situations.</p>
+
+<p>You can also look at some specific <A
+HREF="performance.html">performance numbers</A>.</p>
+
+
+<hr>
+<h2><tt>dense_hash_map</tt></h2>
+
+<p>dense_hash_map is identical to dense_hash_set except for what values
+are stored in each table entry.</p>
+
+<hr>
+<author>
+Craig Silverstein<br>
+Thu Jan  6 20:15:42 PST 2005
+</author>
+
+</body>
+</html>
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/sparsetable.html
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/sparsetable.html	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/sparsetable.html	(revision 2162)
@@ -0,0 +1,1398 @@
+<HTML>
+<!-- The API of this class and the documentation -- but not the
+     implementation! -- are based on that for SGI's hash_set class:
+  -->
+<!--
+  -- Copyright (c) 1996-1999
+  -- Silicon Graphics Computer Systems, Inc.
+  --
+  -- Permission to use, copy, modify, distribute and sell this software
+  -- and its documentation for any purpose is hereby granted without fee,
+  -- provided that the above copyright notice appears in all copies and
+  -- that both that copyright notice and this permission notice appear
+  -- in supporting documentation.  Silicon Graphics makes no
+  -- representations about the suitability of this software for any
+  -- purpose.  It is provided "as is" without express or implied warranty.
+  --
+  -- Copyright (c) 1994
+  -- Hewlett-Packard Company
+  --
+  -- Permission to use, copy, modify, distribute and sell this software
+  -- and its documentation for any purpose is hereby granted without fee,
+  -- provided that the above copyright notice appears in all copies and
+  -- that both that copyright notice and this permission notice appear
+  -- in supporting documentation.  Hewlett-Packard Company makes no
+  -- representations about the suitability of this software for any
+  -- purpose.  It is provided "as is" without express or implied warranty.
+  --
+  -->
+
+<HEAD>
+<Title>sparsetable&lt;T, GROUP_SIZE&gt;</Title>
+</HEAD>
+
+<BODY>
+
+<p><i>[Note: this document is formatted similarly to the SGI STL
+implementation documentation pages, and refers to concepts and classes
+defined there.  However, neither this document nor the code it
+describes is associated with SGI, nor is it necessary to have SGI's
+STL implementation installed in order to use this class.]</i></p>
+
+<H1>sparsetable&lt;T, GROUP_SIZE&gt;</H1>
+
+<p>A <tt>sparsetable</tt> is a <A
+href="http://www.sgi.com/tech/stl/RandomAccessContainer.html">Random
+Access Container</A> that supports constant time random access to
+elements, and constant time insertion and removal of elements.  It
+implements the "array" or "table" abstract data type.  The number of
+elements in a <tt>sparsetable</tt> is set at constructor time, though
+you can change it at any time by calling <tt>resize()</tt>.</p>
+
+<p><tt>sparsetable</tt> is distinguished from other array
+implementations, including the default C implementation, in its stingy
+use of memory -- in particular, unused array elements require only 1 bit
+of disk space to store, rather than <tt>sizeof(T)</tt> bytes -- and by
+the ability to save and restore contents to disk.  On the other hand,
+this array implementation, while still efficient, is slower than other
+array implementations.</p>
+
+<A NAME="assigned">
+<p>A <tt>sparsetable</tt> distinguishes between table elements that
+have been <i>assigned</i> and those that are <i>unassigned</i>.
+Assigned table elements are those that have had a value set via
+<tt>set()</tt>, <tt>operator()</tt>, assignment via an iterator, and
+so forth.  Unassigned table elements are those that have not had a
+value set in one of these ways, or that have been explicitly
+unassigned via a call to <tt>erase()</tt> or <tt>clear()</tt>.  Lookup
+is valid on both assigned and unassigned table elements; for
+unassigned elements, lookup returns the default value
+<tt>T()</tt>.</p>
+</A>
+
+<p>This class is appropriate for applications that need to store large
+arrays in memory, and for applications that need these arrays to be
+persistent.</p>
+
+
+<h3>Example</h3>
+
+<pre>
+#include &lt;google/sparsetable&gt;
+
+sparsetable&lt;int&gt; t(100);
+t[5] = 6;
+cout &lt;&lt; "t[5] = " &lt;&lt t[5];
+cout &lt;&lt; "Default value = " &lt;&lt t[99];
+</pre>
+
+
+<h3>Definition</h3>
+
+Defined in the header <A
+href="sparsetable.h">sparsetable.h</A>.  This class is not
+part of the C++ standard.
+
+
+<h3>Template parameters</h3>
+
+<table border>
+<TR><TH>Parameter</TH><TH>Description</TH><TH>Default</TH></TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>T</tt>
+</TD>
+<TD VAlign=top>
+   The sparsetable's value type: the type of object that is stored in
+   the table.
+</TD>
+<TD VAlign=top>
+   &nbsp;
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>GROUP_SIZE</tt>
+</TD>
+<TD VAlign=top>
+   The number of elements in each sparsetable group (see <A
+   HREF="implementation.html">the implementation doc</A> for more details
+   on this value).  This almost never need be specified; the default
+   template parameter value works well in all situations.
+</TD>
+<TD VAlign=top>
+   &nbsp;
+</TD>
+</TR>
+
+</table>
+
+
+<h3>Model of</h3>
+
+<A href="http://www.sgi.com/tech/stl/RandomAccessContainer.html">Random Access Container</A>
+
+
+<h3>Type requirements</h3>
+
+None, except for those imposed by the requirements of 
+<A
+href="http://www.sgi.com/tech/stl/RandomAccessContainer.html">Random
+Access Container</A>
+
+
+<h3>Public base classes</h3>
+
+None.
+
+
+<h3>Members</h3>
+
+<table border>
+<TR><TH>Member</TH><TH>Where defined</TH><TH>Description</TH></TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>value_type</tt> <A href="#1">[1]</A>
+</TD>
+<TD VAlign=top>
+   <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   The type of object, <tt>T</tt>, stored in the table.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>pointer</tt>
+</TD>
+<TD VAlign=top>
+   <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Pointer to <tt>T</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reference</tt>
+</TD>
+<TD VAlign=top>
+   <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Reference to <tt>T</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reference</tt>
+</TD>
+<TD VAlign=top>
+   <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Const reference to <tt>T</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type</tt>
+</TD>
+<TD VAlign=top>
+   <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   An unsigned integral type.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>difference_type</tt>
+</TD>
+<TD VAlign=top>
+   <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   A signed integral type.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator</tt>
+</TD>
+<TD VAlign=top>
+   <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Iterator used to iterate through a <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_iterator</tt>
+</TD>
+<TD VAlign=top>
+   <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Const iterator used to iterate through a <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reverse_iterator</tt>
+</TD>
+<TD VAlign=top>
+   <A
+   href="http://www.sgi.com/tech/stl/ReversibleContainer.html">Reversible
+   Container</A>
+</TD>
+<TD VAlign=top>
+   Iterator used to iterate backwards through a <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reverse_iterator</tt>
+</TD>
+<TD VAlign=top>
+   <A
+   href="http://www.sgi.com/tech/stl/ReversibleContainer.html">Reversible
+   Container</A>
+</TD>
+<TD VAlign=top>
+   Const iterator used to iterate backwards through a
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>nonempty_iterator</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Iterator used to iterate through the
+   <A HREF="#assigned">assigned</A> elements of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_nonempty_iterator</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Const iterator used to iterate through the
+   <A HREF="#assigned">assigned</A> elements of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reverse_nonempty_iterator</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Iterator used to iterate backwards through the
+   <A HREF="#assigned">assigned</A> elements of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reverse_nonempty_iterator</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Const iterator used to iterate backwards through the
+   <A HREF="#assigned">assigned</A> elements of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>destructive_iterator</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Iterator used to iterate through the
+   <A HREF="#assigned">assigned</A> elements of the
+   <tt>sparsetable</tt>, erasing elements as it iterates.
+   <A href="#2">[2]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator begin()</tt>
+</TD>
+<TD VAlign=top>
+   <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>iterator</tt> pointing to the beginning of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator end()</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>iterator</tt> pointing to the end of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_iterator begin() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>const_iterator</tt> pointing to the beginning of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_iterator end() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>const_iterator</tt> pointing to the end of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reverse_iterator rbegin()</tt>
+</TD>
+<TD VAlign=top>
+   <A
+   href="http://www.sgi.com/tech/stl/ReversibleContainer.html">Reversible
+   Container</A>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>reverse_iterator</tt> pointing to the beginning of the
+   reversed <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reverse_iterator rend()</tt>
+</TD>
+<TD VAlign=top>
+   <A
+   href="http://www.sgi.com/tech/stl/ReversibleContainer.html">Reversible
+   Container</A>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>reverse_iterator</tt> pointing to the end of the
+   reversed <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reverse_iterator rbegin() const</tt>
+</TD>
+<TD VAlign=top>
+   <A
+   href="http://www.sgi.com/tech/stl/ReversibleContainer.html">Reversible
+   Container</A>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>const_reverse_iterator</tt> pointing to the beginning
+   of the reversed <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reverse_iterator rend() const</tt>
+</TD>
+<TD VAlign=top>
+   <A
+   href="http://www.sgi.com/tech/stl/ReversibleContainer.html">Reversible
+   Container</A>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>const_reverse_iterator</tt> pointing to the end of
+   the reversed <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>nonempty_iterator nonempty_begin()</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>nonempty_iterator</tt> pointing to the first
+   <A HREF="#assigned">assigned</A> element of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>nonempty_iterator nonempty_end()</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>nonempty_iterator</tt> pointing to the end of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_nonempty_iterator nonempty_begin() const</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>const_nonempty_iterator</tt> pointing to the first
+   <A HREF="#assigned">assigned</A> element of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_nonempty_iterator nonempty_end() const</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>const_nonempty_iterator</tt> pointing to the end of
+   the <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reverse_nonempty_iterator nonempty_rbegin()</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>reverse_nonempty_iterator</tt> pointing to the first
+   <A HREF="#assigned">assigned</A> element of the reversed
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reverse_nonempty_iterator nonempty_rend()</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>reverse_nonempty_iterator</tt> pointing to the end of
+   the reversed <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reverse_nonempty_iterator nonempty_rbegin() const</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>const_reverse_nonempty_iterator</tt> pointing to the
+   first <A HREF="#assigned">assigned</A> element of the reversed
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reverse_nonempty_iterator nonempty_rend() const</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>const_reverse_nonempty_iterator</tt> pointing to the
+   end of the reversed <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>destructive_iterator destructive_begin()</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>destructive_iterator</tt> pointing to the first
+   <A HREF="#assigned">assigned</A> element of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>destructive_iterator destructive_end()</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>destructive_iterator</tt> pointing to the end of
+   the <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type size() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the size of the <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type max_size() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the largest possible size of the <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool empty() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   <tt>true</tt> if the <tt>sparsetable</tt>'s size is <tt>0</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type num_nonempty() const</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Returns the number of sparsetable elements that are currently <A
+   HREF="#assigned">assigned</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>sparsetable(size_type n)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a <tt>sparsetable</tt> with <tt>n</tt> elements.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>sparsetable(const sparsetable&amp;)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   The copy constructor.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>~sparsetable()</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   The destructor.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>sparsetable&amp; operator=(const sparsetable&amp;)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   The assignment operator
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void swap(sparsetable&amp;)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Swaps the contents of two sparsetables.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reference operator[](size_type n)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/RandomAccessContainer.html">Random
+    Access Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the <tt>n</tt>'th element.  <A href="#3">[2]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reference operator[](size_type n) const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/RandomAccessContainer.html">Random
+    Access Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the <tt>n</tt>'th element.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool test(size_type i) const</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   true if the <tt>i</tt>'th element of the <tt>sparsetable</tt> is <A
+   HREF="#assigned">assigned</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool test(iterator pos) const</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   true if the <tt>sparsetable</tt> element pointed to by <tt>pos</tt>
+   is <A HREF="#assigned">assigned</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool test(const_iterator pos) const</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   true if the <tt>sparsetable</tt> element pointed to by <tt>pos</tt>
+   is <A HREF="#assigned">assigned</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reference get(size_type i) const</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   returns the <tt>i</tt>'th element of the <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reference set(size_type i, const_reference val)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Sets the <tt>i</tt>'th element of the <tt>sparsetable</tt> to value
+   <tt>val</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void erase(size_type i)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Erases the <tt>i</tt>'th element of the <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void erase(iterator pos)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Erases the element of the <tt>sparsetable</tt> pointed to by
+   <tt>pos</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void erase(iterator first, iterator last)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Erases the elements of the <tt>sparsetable</tt> in the range
+   <tt>[first, last)</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void clear()</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Erases all of the elements.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void resize(size_type n)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   Changes the size of sparsetable to <tt>n</tt>.
+   <A HREF="#1">[1]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparsetable</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>bool operator==(const sparsetable&amp;, const sparsetable&amp;)
+</pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/ForwardContainer.html">Forward
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Tests two sparsetables for equality.  This is a global function,
+   not a member function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>bool operator&lt;(const sparsetable&amp;, const sparsetable&amp;)
+</pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/ForwardContainer.html">Forward
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Lexicographical comparison.  This is a global function,
+   not a member function.
+</TD>
+</TR>
+
+</table>
+
+
+<h3>New members</h3>
+
+These members are not defined in the <A
+href="http://www.sgi.com/tech/stl/RandomAccessContainer.html">Random
+Access Container</A> requirement, but are specific to
+<tt>sparsetable</tt>.
+
+<table border>
+<TR><TH>Member</TH><TH>Description</TH></TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>nonempty_iterator</tt>
+</TD>
+<TD VAlign=top>
+   Iterator used to iterate through the
+   <A HREF="#assigned">assigned</A> elements of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_nonempty_iterator</tt>
+</TD>
+<TD VAlign=top>
+   Const iterator used to iterate through the
+   <A HREF="#assigned">assigned</A> elements of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reverse_nonempty_iterator</tt>
+</TD>
+<TD VAlign=top>
+   Iterator used to iterate backwards through the
+   <A HREF="#assigned">assigned</A> elements of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reverse_nonempty_iterator</tt>
+</TD>
+<TD VAlign=top>
+   Const iterator used to iterate backwards through the
+   <A HREF="#assigned">assigned</A> elements of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>destructive_iterator</tt>
+</TD>
+<TD VAlign=top>
+   Iterator used to iterate through the
+   <A HREF="#assigned">assigned</A> elements of the
+   <tt>sparsetable</tt>, erasing elements as it iterates.
+   <A href="#2">[2]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>nonempty_iterator nonempty_begin()</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>nonempty_iterator</tt> pointing to the first
+   <A HREF="#assigned">assigned</A> element of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>nonempty_iterator nonempty_end()</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>nonempty_iterator</tt> pointing to the end of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_nonempty_iterator nonempty_begin() const</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>const_nonempty_iterator</tt> pointing to the first
+   <A HREF="#assigned">assigned</A> element of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_nonempty_iterator nonempty_end() const</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>const_nonempty_iterator</tt> pointing to the end of
+   the <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reverse_nonempty_iterator nonempty_rbegin()</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>reverse_nonempty_iterator</tt> pointing to the first
+   <A HREF="#assigned">assigned</A> element of the reversed
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reverse_nonempty_iterator nonempty_rend()</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>reverse_nonempty_iterator</tt> pointing to the end of
+   the reversed <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reverse_nonempty_iterator nonempty_rbegin() const</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>const_reverse_nonempty_iterator</tt> pointing to the
+   first <A HREF="#assigned">assigned</A> element of the reversed
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reverse_nonempty_iterator nonempty_rend() const</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>const_reverse_nonempty_iterator</tt> pointing to the
+   end of the reversed <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>destructive_iterator destructive_begin()</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>destructive_iterator</tt> pointing to the first
+   <A HREF="#assigned">assigned</A> element of the
+   <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>destructive_iterator destructive_end()</tt>
+</TD>
+<TD VAlign=top>
+   Returns a <tt>destructive_iterator</tt> pointing to the end of
+   the <tt>sparsetable</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type num_nonempty() const</tt>
+</TD>
+<TD VAlign=top>
+   Returns the number of sparsetable elements that are currently <A
+   HREF="#assigned">assigned</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool test(size_type i) const</tt>
+</TD>
+<TD VAlign=top>
+   true if the <tt>i</tt>'th element of the <tt>sparsetable</tt> is <A
+   HREF="#assigned">assigned</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool test(iterator pos) const</tt>
+</TD>
+<TD VAlign=top>
+   true if the <tt>sparsetable</tt> element pointed to by <tt>pos</tt>
+   is <A HREF="#assigned">assigned</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool test(const_iterator pos) const</tt>
+</TD>
+<TD VAlign=top>
+   true if the <tt>sparsetable</tt> element pointed to by <tt>pos</tt>
+   is <A HREF="#assigned">assigned</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reference get(size_type i) const</tt>
+</TD>
+<TD VAlign=top>
+   returns the <tt>i</tt>'th element of the <tt>sparsetable</tt>.  If
+   the <tt>i</tt>'th element is <A HREF="#assigned">assigned</A>, the
+   assigned value is returned, otherwise, the default value
+   <tt>T()</tt> is returned.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reference set(size_type i, const_reference val)</tt>
+</TD>
+<TD VAlign=top>
+   Sets the <tt>i</tt>'th element of the <tt>sparsetable</tt> to value
+   <tt>val</tt>, and returns a reference to the <tt>i</tt>'th element
+   of the table.  This operation causes the <tt>i</tt>'th element to
+   be <A HREF="#assigned">assigned</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void erase(size_type i)</tt>
+</TD>
+<TD VAlign=top>
+   Erases the <tt>i</tt>'th element of the <tt>sparsetable</tt>.  This
+   operation causes the <tt>i</tt>'th element to be <A
+   HREF="#assigned">unassigned</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void erase(iterator pos)</tt>
+</TD>
+<TD VAlign=top>
+   Erases the element of the <tt>sparsetable</tt> pointed to by
+   <tt>pos</tt>.  This operation causes the <tt>i</tt>'th element to
+   be <A HREF="#assigned">unassigned</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void erase(iterator first, iterator last)</tt>
+</TD>
+<TD VAlign=top>
+   Erases the elements of the <tt>sparsetable</tt> in the range
+   <tt>[first, last)</tt>.  This operation causes these elements to
+   be <A HREF="#assigned">unassigned</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void clear()</tt>
+</TD>
+<TD VAlign=top>
+   Erases all of the elements.  This causes all elements to be
+   <A HREF="#assigned">unassigned</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void resize(size_type n)</tt>
+</TD>
+<TD VAlign=top>
+   Changes the size of sparsetable to <tt>n</tt>.  If <tt>n</tt> is
+   greater than the old size, new, <A HREF="#assigned">unassigned</A>
+   elements are appended.  If <tt>n</tt> is less than the old size,
+   all elements in position &gt;<tt>n</tt> are deleted.
+   <A HREF="#1">[1]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Write hashtable metadata to <tt>fp</tt>.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Read hashtable metadata from <tt>fp</tt>.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Write hashtable contents to <tt>fp</tt>.  This is valid only if the
+   hashtable key and value are "plain" data.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Read hashtable contents to <tt>fp</tt>.  This is valid only if the
+   hashtable key and value are "plain" data.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+</table>
+
+
+<h3>Notes</h3>
+
+<P><A name="1">[1]</A>
+
+<tt>value_type</tt> must be <A
+HREF="http://c2.com/cgi/wiki?PlainOldData">plain old data</A> (see <A
+HREF="implementation.html">implementation.html</A> for why this is necessary).
+In addition, there should be no data structures that point directly
+into parts of value, including the value itself (for instance, you
+cannot have a value like <tt>struct {int a = 1, *b = &a}</tt>.  This
+is because <tt>sparsetable</tt> uses <tt>malloc()</tt> and
+<tt>free</tt> to allocate space for the key and value, and
+<tt>memmove()</tt> to reorganize the key and value in memory.</p>
+
+<p>Almost all common uses fit this criterion: <tt>value_type</tt> can
+be a basic C type or an STL type like <tt>string</tt>, for instance.
+
+<P><A name="2">[2]</A>
+
+<tt>sparsetable::destructive_iterator</tt> iterates through a
+sparsetable like a normal iterator, but <tt>++it</tt> may delete the
+element being iterated past.  Obviously, this iterator can only be
+used once on a given table!  One application of this iterator is to
+copy data from a sparsetable to some other data structure without
+using extra memory to store the data in both places during the
+copy.</p>
+
+<P><A name="3">[3]</A>
+
+Since <tt>operator[]</tt> might insert a new element into the
+<tt>sparsetable</tt>, it can't possibly be a <tt>const</tt> member
+function.  In theory, since it might insert a new element, it should
+cause the element it refers to to become <A
+HREF="#assigned">assigned</A>.  However, this is undesirable when
+<tt>operator[]</tt> is used to examine elements, rather than assign
+them.   Thus, as an implementation trick, <tt>operator[]</tt> does not
+really return a <tt>reference</tt>.  Instead it returns an object that
+behaves almost exactly like a <tt>reference</tt>.  This object,
+however, delays setting the appropriate sparsetable element to <A
+HREF="#assigned">assigned</A> to when it is actually assigned to.</p>
+
+<p>For a bit more detail: the object returned by <tt>operator[]</tt>
+is an opaque type which defines <tt>operator=</tt>, <tt>operator
+reference()</tt>, and <tt>operator&</tt>.  The first operator controls
+assigning to the value.  The second controls examining the value.  The
+third controls pointing to the value.</p>
+
+<p>All three operators perform exactly as an object of type
+<tt>reference</tt> would perform.  The only problems that arise is
+when this object is accessed in situations where C++ cannot do the
+conversion by default.  By far the most common situation is with
+variadic functions such as <tt>printf</tt>.  In such situations, you
+may need to manually cast the object to the right type:</p>
+<pre>
+   printf("%d", static_cast&lt;typename table::reference&gt;(table[i]));
+</pre>
+
+
+<h3><A NAME=io>Input/Output</A></h3>
+
+<p>It is possible to save and restore <tt>sparsetable</tt> objects
+to disk.  Storage takes place in two steps.  The first writes the
+table metadata.  The second writes the actual data.</p>
+
+<p>To write a sparsetable to disk, first call <tt>write_metadata()</tt>
+on an open file pointer.  This saves the sparsetable information in a
+byte-order-independent format.  However, currently information written
+by a 32-bit system cannot be read by a 64-bit system, and vice
+versa.</p>
+
+<p>After the metadata has been written to disk, you must write the
+actual data stored in the sparsetable to disk.  If the value is
+"simple" enough, you can do this by calling
+<tt>write_nopointer_data()</tt>.  "Simple" data is data that can be
+safely copied to disk via <tt>fwrite()</tt>.  Native C data types fall
+into this category, as do structs of native C data types.  Pointers
+and STL objects do not.</p>
+
+<p>Note that <tt>write_nopointer_data()</tt> does not do any endian
+conversion.  Thus, it is only appropriate when you intend to read the
+data on the same endian architecture as you write the data.</p>
+
+<p>If you cannot use <tt>write_nopointer_data()</tt> for any reason,
+you can write the data yourself by iterating over the
+<tt>sparsetable</tt> with a <tt>const_nonempty_iterator</tt> and
+writing the key and data in any manner you wish.</p>
+
+<p>To read the hashtable information from disk, first you must create
+a <tt>sparsetable</tt> object.  Then open a file pointer to point
+to the saved sparsetable, and call <tt>read_metadata()</tt>.  If you
+saved the data via <tt>write_nopointer_data()</tt>, you can follow the
+<tt>read_metadata()</tt> call with a call to
+<tt>read_nopointer_data()</tt>.  This is all that is needed.</p>
+
+<p>If you saved the data through a custom write routine, you must call
+a custom read routine to read in the data.  To do this, iterate over
+the <tt>sparsetable</tt> with a <tt>nonempty_iterator</tt>; this
+operation is sensical because the metadata has already been set up.
+For each iterator item, you can read the key and value from disk, and
+set it appropriately.  The code might look like this:</p>
+<pre>
+   for (sparsetable&lt;int*&gt;::nonempty_iterator it = t.nonempty_begin();
+        it != t.nonempty_end(); ++it) {
+       *it = new int;
+       fread(*it, sizeof(int), 1, fp);
+   }
+</pre>
+
+
+<h3>See also</h3>
+
+<p>The following are SGI STL concepts and classes related to
+<tt>sparsetable</tt>.</p>
+
+<A href="http://www.sgi.com/tech/stl/Container.html">Container</A>,
+<A href="http://www.sgi.com/tech/stl/RandomAccessContainer.html">Random Access Container</A>,
+<tt><A href="sparse_hash_set.html">sparse_hash_set</A></tt>,
+<tt><A href="sparse_hash_map.html">sparse_hash_map</A></tt>
+
+</BODY>
+</HTML> 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/sparse_hash_set.html
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/sparse_hash_set.html	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/doc/sparse_hash_set.html	(revision 2162)
@@ -0,0 +1,1141 @@
+<HTML>
+<!-- The API of this class and the documentation -- but not the
+     implementation! -- are based on that for SGI's hash_set class:
+  -->
+<!--
+  -- Copyright (c) 1996-1999
+  -- Silicon Graphics Computer Systems, Inc.
+  --
+  -- Permission to use, copy, modify, distribute and sell this software
+  -- and its documentation for any purpose is hereby granted without fee,
+  -- provided that the above copyright notice appears in all copies and
+  -- that both that copyright notice and this permission notice appear
+  -- in supporting documentation.  Silicon Graphics makes no
+  -- representations about the suitability of this software for any
+  -- purpose.  It is provided "as is" without express or implied warranty.
+  --
+  -- Copyright (c) 1994
+  -- Hewlett-Packard Company
+  --
+  -- Permission to use, copy, modify, distribute and sell this software
+  -- and its documentation for any purpose is hereby granted without fee,
+  -- provided that the above copyright notice appears in all copies and
+  -- that both that copyright notice and this permission notice appear
+  -- in supporting documentation.  Hewlett-Packard Company makes no
+  -- representations about the suitability of this software for any
+  -- purpose.  It is provided "as is" without express or implied warranty.
+  --
+  -->
+
+<HEAD>
+<Title>sparse_hash_set&lt;Key, HashFcn, EqualKey, Alloc&gt;</Title>
+</HEAD>
+
+<BODY>
+
+<p><i>[Note: this document is formatted similarly to the SGI STL
+implementation documentation pages, and refers to concepts and classes
+defined there.  However, neither this document nor the code it
+describes is associated with SGI, nor is it necessary to have SGI's
+STL implementation installed in order to use this class.]</i></p>
+
+
+<H1>sparse_hash_set&lt;Key, HashFcn, EqualKey, Alloc&gt;</H1>
+
+<p><tt>sparse_hash_set</tt> is a <A
+href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+Associative Container</A> that stores objects of type <tt>Key</tt>.
+<tt>sparse_hash_set</tt> is a <A
+href="http://www.sgi.com/tech/stl/SimpleAssociativeContainer.html">Simple
+Associative Container</A>, meaning that its value type, as well as its
+key type, is <tt>key</tt>.  It is also a
+<A
+href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+Associative Container</A>, meaning that no two elements have keys that
+compare equal using <tt>EqualKey</tt>.</p>
+
+<p>Looking up an element in a <tt>sparse_hash_set</tt> by its key is
+efficient, so <tt>sparse_hash_set</tt> is useful for &quot;dictionaries&quot;
+where the order of elements is irrelevant.  If it is important for the
+elements to be in a particular order, however, then <tt><A
+href="http://www.sgi.com/tech/stl/Map.html">map</A></tt> is more appropriate.</p>
+
+<p><tt>sparse_hash_set</tt> is distinguished from other hash-set
+implementations by its stingy use of memory and by the ability to save
+and restore contents to disk.  On the other hand, this hash-set
+implementation, while still efficient, is slower than other hash-set
+implementations, and it also has requirements -- for instance, for a
+distinguished "deleted key" -- that may not be easy for all
+applications to satisfy.</p>
+
+<p>This class is appropriate for applications that need to store
+large "dictionaries" in memory, and for applications that need these
+dictionaries to be persistent.</p>
+
+
+<h3>Example</h3>
+
+<pre>
+#include &lt;google/sparse_hash_set&gt;
+
+using std::sparse_hash_set;      // namespace where class lives by default
+
+struct eqstr
+{
+  bool operator()(const char* s1, const char* s2) const
+  {
+    return strcmp(s1, s2) == 0;
+  }
+};
+
+void lookup(const hash_set&lt;const char*, hash&lt;const char*&gt;, eqstr&gt;&amp; Set,
+            const char* word)
+{
+  hash_set&lt;const char*, hash&lt;const char*&gt;, eqstr&gt;::const_iterator it
+    = Set.find(word);
+  cout &lt;&lt; word &lt;&lt; &quot;: &quot;
+       &lt;&lt; (it != Set.end() ? &quot;present&quot; : &quot;not present&quot;)
+       &lt;&lt; endl;
+}
+
+int main()
+{
+  sparse_hash_set&lt;const char*, hash&lt;const char*&gt;, eqstr&gt; Set;
+  Set.insert(&quot;kiwi&quot;);
+  Set.insert(&quot;plum&quot;);
+  Set.insert(&quot;apple&quot;);
+  Set.insert(&quot;mango&quot;);
+  Set.insert(&quot;apricot&quot;);
+  Set.insert(&quot;banana&quot;);
+
+  lookup(Set, &quot;mango&quot;);
+  lookup(Set, &quot;apple&quot;);
+  lookup(Set, &quot;durian&quot;);
+}
+</pre>
+
+
+<h3>Definition</h3>
+
+Defined in the header <A
+href="sparse_hash_set.h">sparse_hash_set.h</A>.  This class is not
+part of the C++ standard.
+
+
+<h3>Template parameters</h3>
+
+<table border>
+<TR><TH>Parameter</TH><TH>Description</TH><TH>Default</TH></TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>Key</tt>
+</TD>
+<TD VAlign=top>
+   The hash_set's key and value type.  This is also defined as
+   <tt>sparse_hash_set::key_type</tt> and
+   <tt>sparse_hash_set::value_type</tt>.
+</TD>
+<TD VAlign=top>
+   &nbsp;
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>Data</tt>
+</TD>
+<TD VAlign=top>
+   The hash_set's data type.  This is also defined as
+   <tt>sparse_hash_set::data_type</tt>.
+</TD>
+<TD VAlign=top>
+   &nbsp;
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>HashFcn</tt>
+</TD>
+<TD VAlign=top>
+   The <A href="http://www.sgi.com/tech/stl/HashFunction.html">hash function</A> used by the
+   hash_set.  This is also defined as <tt>sparse_hash_set::hasher</tt>.  
+   <br><b>Note:</b> Hashtable performance depends heavliy on the choice of
+   hash function.  See <A HREF="performance.html#hashfn">the performance
+   page</A> for more information.
+</TD>
+<TD VAlign=top>
+   <tt><A href="http://www.sgi.com/tech/stl/hash.html">hash</A>&lt;Key&gt;</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>EqualKey</tt>
+</TD>
+<TD VAlign=top>
+   The hash_set key equality function: a <A
+   href="http://www.sgi.com/tech/stl/BinaryPredicate.html">binary predicate</A> that determines
+   whether two keys are equal.  This is also defined as
+   <tt>sparse_hash_set::key_equal</tt>.
+</TD>
+<TD VAlign=top>
+   <tt><A href="http://www.sgi.com/tech/stl/equal_to.html">equal_to</A>&lt;Key&gt;</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>Alloc</tt>
+</TD>
+<TD VAlign=top>
+   <b>Ignored</b>; this is included only for API-compatibility
+   with SGI's STL implementation.
+</TD>
+<TD VAlign=top>
+    <tt><A href="http://www.sgi.com/tech/stl/Allocators.html">alloc</A></tt>
+</TD>
+</TR>
+
+</table>
+
+
+<h3>Model of</h3>
+
+<A href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique Hashed Associative Container</A>,
+<A href="http://www.sgi.com/tech/stl/SimpleAssociativeContainer.html">Simple Associative Container</A>
+
+
+<h3>Type requirements</h3>
+
+<UL>
+<LI>
+<tt>Key</tt> is Assignable.
+<LI>
+<tt>EqualKey</tt> is a Binary Predicate whose argument type is Key.
+<LI>
+<tt>EqualKey</tt> is an equivalence relation.
+<LI>
+<tt>Alloc</tt> is an Allocator.
+</UL>
+
+
+<h3>Public base classes</h3>
+
+None.
+
+
+<h3>Members</h3>
+
+<table border>
+<TR><TH>Member</TH><TH>Where defined</TH><TH>Description</TH></TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>value_type</tt> <A href="#5">[7]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   The type of object, <tt>T</tt>, stored in the hash_set.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>key_type</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   The key type associated with <tt>value_type</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>hasher</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   The <tt>sparse_hash_set</tt>'s <A
+   href="http://www.sgi.com/tech/stl/HashFunction.html">hash
+   function</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>key_equal</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/functors.html">Function
+    object</A> that compares keys for equality.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>pointer</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Pointer to <tt>T</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>reference</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Reference to <tt>T</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_reference</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Const reference to <tt>T</tt>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   An unsigned integral type.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>difference_type</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   A signed integral type.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Iterator used to iterate through a <tt>sparse_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>const_iterator</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Const iterator used to iterate through a <tt>sparse_hash_set</tt>.
+   (<tt>iterator</tt> and <tt>const_iterator</tt> are the same type.)
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator begin() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>iterator</tt> pointing to the beginning of the
+   <tt>sparse_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator end() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns an <tt>iterator</tt> pointing to the end of the
+   <tt>sparse_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type size() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the size of the <tt>sparse_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type max_size() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the largest possible size of the <tt>sparse_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool empty() const</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   <tt>true</tt> if the <tt>sparse_hash_set</tt>'s size is <tt>0</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type bucket_count() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the number of buckets used by the <tt>sparse_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type max_bucket_count() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the largest possible number of buckets used by the <tt>sparse_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void resize(size_type n)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Increases the bucket count to at least <tt>n</tt>.
+   <A href="#2">[4]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>hasher hash_funct() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the <tt>hasher</tt> object used by the <tt>sparse_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>key_equal key_eq() const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Returns the <tt>key_equal</tt> object used by the
+   <tt>sparse_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>sparse_hash_set()</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>sparse_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>sparse_hash_set(size_type n)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>sparse_hash_set</tt> that's optimized for holding
+   up to <tt>n</tt> items.
+   <A href="#3">[5]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>sparse_hash_set(size_type n, const hasher&amp; h)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>sparse_hash_set</tt> that's optimized for up
+   to <tt>n</tt> items, using <tt>h</tt> as the hash function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>sparse_hash_set(size_type n, const hasher&amp; h, const
+   key_equal&amp; k)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates an empty <tt>sparse_hash_set</tt> that's optimized for up
+   to <tt>n</tt> items, using <tt>h</tt> as the hash function and
+   <tt>k</tt> as the key equal function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+sparse_hash_set(InputIterator f, InputIterator l) </pre>
+<A href="#1">[2]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a sparse_hash_set with a copy of a range.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+sparse_hash_set(InputIterator f, InputIterator l, size_type n) </pre>
+<A href="#1">[2]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a hash_set with a copy of a range that's optimized to
+   hold up to <tt>n</tt> items.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+sparse_hash_set(InputIterator f, InputIterator l, size_type n, const
+hasher&amp; h) </pre> <A href="#1">[2]</A> 
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a hash_set with a copy of a range that's optimized to hold
+   up to <tt>n</tt> items, using <tt>h</tt> as the hash function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+sparse_hash_set(InputIterator f, InputIterator l, size_type n, const
+hasher&amp; h, const key_equal&amp; k) </pre> <A href="#1">[2]</A>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+    Hashed Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Creates a hash_set with a copy of a range that's optimized for
+   holding up to <tt>n</tt> items, using <tt>h</tt> as the hash
+   function and <tt>k</tt> as the key equal function.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>sparse_hash_set(const hash_set&amp;)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   The copy constructor.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>sparse_hash_set&amp; operator=(const hash_set&amp;)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   The assignment operator
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void swap(hash_set&amp;)</tt>
+</TD>
+<TD VAlign=top>
+    <A href="http://www.sgi.com/tech/stl/Container.html">Container</A>
+</TD>
+<TD VAlign=top>
+   Swaps the contents of two hash_sets.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>pair&lt;iterator, bool&gt; insert(const value_type&amp; x)
+</pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Inserts <tt>x</tt> into the <tt>sparse_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>template &lt;class <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</A>&gt;
+void insert(InputIterator f, InputIterator l) </pre> <A href="#1">[2]</A> 
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Inserts a range into the <tt>sparse_hash_set</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void set_deleted_key(const key_type& key)</tt> <A href="#4">[6]</A>
+</TD>
+<TD VAlign=top>
+   <tt>sparse_hash_set</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void clear_deleted_key()</tt> <A href="#4">[6]</A>
+</TD>
+<TD VAlign=top>
+   <tt>sparse_hash_set</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void erase(iterator pos)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases the element pointed to by <tt>pos</tt>.
+   <A href="#4">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type erase(const key_type&amp; k)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases the element whose key is <tt>k</tt>.
+   <A href="#4">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void erase(iterator first, iterator last)</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases all elements in a range.
+   <A href="#4">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void clear()</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Erases all of the elements.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>iterator find(const key_type&amp; k) const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Finds an element whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>size_type count(const key_type&amp; k) const</tt>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/UniqueAssociativeContainer.html">Unique
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Counts the number of elements whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>pair&lt;iterator, iterator&gt; equal_range(const
+key_type&amp; k) const</pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative
+    Container</A>
+</TD>
+<TD VAlign=top>
+   Finds a range containing all elements whose key is <tt>k</tt>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparse_hash_set</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparse_hash_set</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparse_hash_set</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   <tt>sparse_hash_set</tt>
+</TD>
+<TD VAlign=top>
+   See below.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <pre>bool operator==(const hash_set&amp;, const hash_set&amp;)
+</pre>
+</TD>
+<TD VAlign=top>
+    <A
+    href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed
+    Associative Container</A>
+</TD>
+<TD VAlign=top>
+   Tests two hash_sets for equality.  This is a global function, not a
+   member function.
+</TD>
+</TR>
+
+</table>
+
+
+<h3>New members</h3>
+
+These members are not defined in the <A
+href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique
+Hashed Associative Container</A> and <A
+href="http://www.sgi.com/tech/stl/SimpleAssociativeContainer.html">Simple
+Associative Container</A> requirements, but are specific to
+<tt>sparse_hash_set</tt>.
+
+<table border>
+<TR><TH>Member</TH><TH>Description</TH></TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void set_deleted_key(const key_type& key)</tt>
+</TD>
+<TD VAlign=top>
+   Sets the distinguished "deleted" key to <tt>key</tt>.  This must be
+   called before any calls to <tt>erase()</tt>. <A href="#4">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>void clear_deleted_key()</tt> <A href="#4">[6]</A>
+</TD>
+<TD VAlign=top>
+   Clears the distinguished "deleted" key.  After this is called,
+   calls to <tt>erase()</tt> are not valid on this object.
+   <A href="#4">[6]</A>
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Write hashtable metadata to <tt>fp</tt>.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_metadata(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Read hashtable metadata from <tt>fp</tt>.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool write_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Write hashtable contents to <tt>fp</tt>.  This is valid only if the
+   hashtable key and value are "plain" data.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+<TR>
+<TD VAlign=top>
+   <tt>bool read_nopointer_data(FILE *fp)</tt>
+</TD>
+<TD VAlign=top>
+   Read hashtable contents to <tt>fp</tt>.  This is valid only if the
+   hashtable key and value are "plain" data.  See <A HREF="#io">below</A>.
+</TD>
+</TR>
+
+</table>
+
+
+<h3>Notes</h3>
+
+<P><A name="1">[1]</A>
+
+This member function relies on <i>member template</i> functions, which
+may not be supported by all compilers.  If your compiler supports
+member templates, you can call this function with any type of <A
+href="http://www.sgi.com/tech/stl/InputIterator.html">input
+iterator</A>.  If your compiler does not yet support member templates,
+though, then the arguments must either be of type <tt>const
+value_type*</tt> or of type <tt>sparse_hash_set::const_iterator</tt>.</p>
+
+<P><A name="2">[2]</A>
+
+In order to preserve iterators, erasing hashtable elements does not
+cause a hashtable to resize.  This means that after a string of
+<tt>erase()</tt> calls, the hashtable will use more space than is
+required.  At a cost of invalidating all current iterators, you can
+call <tt>resize()</tt> to manually compact the hashtable.  The
+hashtable promotes too-small <tt>resize()</tt> arguments to the
+smallest legal value, so to compact a hashtable, it's sufficient to
+call <tt>resize(0)</tt>.
+
+<P><A name="3">[3]</A>
+
+Unlike some other hashtable implementations, the optional <i>n</i> in
+the constructor size indicates not the desired number of buckets that
+should be allocated, but instead the expected number of items to be
+inserted.  The class then sizes the hash-set appropriately for the
+number of items specified.  It's not an error to actually insert more
+or fewer items into the hashtable, but the implementation is most
+efficient -- does the fewest hashtable resizes -- if the number of
+inserted items is close to <i>n</i>.</p>
+
+<P><A name="4">[4]</A>
+
+<tt>sparse_hash_set</tt> <b>requires</b> you call
+<tt>set_deleted_key()</tt> before calling <tt>erase()</tt>.  (This is
+the largest difference between the <tt>sparse_hash_set</tt> API and
+other hash-set APIs.  See <A HREF="implementation.html">implementation.html</A>
+for why this is necessary.)
+The argument to <tt>set_deleted_key()</tt> should be a key-value that
+is never used for legitimate hash-set entries.  It is an error to call
+<tt>erase()</tt> without first calling <tt>set_deleted_key()</tt>, and
+it is also an error to call <tt>insert()</tt> with an item whose key
+is the "deleted key."</p>
+
+<p>There is no need to call <tt>set_deleted_key</tt> if you do not
+wish to call <tt>erase()</tt> on the hash-set.</p>
+
+<p>It is acceptable to change the deleted-key at any time by calling
+<tt>set_deleted_key()</tt> with a new argument.  You can also call
+<tt>clear_deleted_key()</tt>, at which point all keys become valid for
+insertion but no hashtable entries can be deleted until
+<tt>set_deleted_key()</tt> is called again.</p>
+
+<P><A name="5">[5]</A>
+
+Both <tt>key_type</tt> and <tt>data_type</tt> must be <A
+HREF="http://c2.com/cgi/wiki?PlainOldData">plain old data</A> (see
+<A HREF="implementation.html">implementation.html</A> for why this is
+necessary).  In addition, there should
+be no data structures that point directly into parts of key or value,
+including the key or value itself (for instance, you cannot have a
+value like <tt>struct {int a = 1, *b = &a}</tt>.  This is because
+<tt>sparse_hash_set</tt> uses <tt>malloc()</tt> and <tt>free()</tt> to
+allocate space for the key and value, and <tt>memmove()</tt> to
+reorganize the key and value in memory.</p>
+
+<p>Almost all common uses fit this criterion: <tt>key_type</tt> can be
+a basic C type or an STL type like <tt>string</tt>, for instance.  If
+<tt>value_type</tt> is complex, consider storing only the pointer to
+the data in the <tt>sparse_hash_set</tt>.  This will speed up the
+hashtable as well, since hashtable resizes will have to manipulate
+less memory.</p>
+
+
+<h3><A NAME=io>Input/Output</A></h3>
+
+<p>It is possible to save and restore <tt>sparse_hash_set</tt> objects
+to disk.  Storage takes place in two steps.  The first writes the
+hashtable metadata.  The second writes the actual data.</p>
+
+<p>To write a hashtable to disk, first call <tt>write_metadata()</tt>
+on an open file pointer.  This saves the hashtable information in a
+byte-order-independent format.</p>
+
+<p>After the metadata has been written to disk, you must write the
+actual data stored in the hash-set to disk.  If both the key and data
+are "simple" enough, you can do this by calling
+<tt>write_nopointer_data()</tt>.  "Simple" data is data that can be
+safely copied to disk via <tt>fwrite()</tt>.  Native C data types fall
+into this category, as do structs of native C data types.  Pointers
+and STL objects do not.</p>
+
+<p>Note that <tt>write_nopointer_data()</tt> does not do any endian
+conversion.  Thus, it is only appropriate when you intend to read the
+data on the same endian architecture as you write the data.</p>
+
+<p>If you cannot use <tt>write_nopointer_data()</tt> for any reason,
+you can write the data yourself by iterating over the
+<tt>sparse_hash_set</tt> with a <tt>const_iterator</tt> and writing
+the key and data in any manner you wish.</p>
+
+<p>To read the hashtable information from disk, first you must create
+a <tt>sparse_hash_set</tt> object.  Then open a file pointer to point
+to the saved hashtable, and call <tt>read_metadata()</tt>.  If you
+saved the data via <tt>write_nopointer_data()</tt>, you can follow the
+<tt>read_metadata()</tt> call with a call to
+<tt>read_nopointer_data()</tt>.  This is all that is needed.</p>
+
+<p>If you saved the data through a custom write routine, you must call
+a custom read routine to read in the data.  To do this, iterate over
+the <tt>sparse_hash_set</tt> with an <tt>iterator</tt>; this operation
+is sensical because the metadata has already been set up.  For each
+iterator item, you can read the key and value from disk, and set it
+appropriately.  You will need to do a <tt>const_cast</tt> on the
+iterator, since <tt>it-&gt;first</tt> is always <tt>const</tt>.  The
+code might look like this:</p>
+<pre>
+   for (sparse_hash_set&lt;int*, int&gt;::iterator it = ht.begin();
+        it != ht.end(); ++it) {
+       const_cast&lt;int*&gt;(it-&gt;first) = new int;
+       fread(const_cast&lt;int*&gt;(it-&gt;first), sizeof(int), 1, fp);
+       fread(&it-&gt;second, sizeof(int), 1, fp);
+   }
+</pre>
+
+
+<h3><A NAME=iter>Validity of Iterators</A></h3>
+
+<p><tt>insert()</tt> invalidates all iterators, as does
+<tt>resize()</tt>.  <tt>erase()</tt> is guaranteed not to invalidate
+any iterators.</p>
+
+<p>This is implemented by making <tt>erase()</tt> not resize the
+hashtable.  If you desire maximum space efficiency, you can call
+<tt>resize(0)</tt> after a string of <tt>erase()</tt> calls, to force
+the hashtable to resize to the smallest possible size.</p>
+
+
+<h3>See also</h3>
+
+<p>The following are SGI STL concepts and classes related to
+<tt>sparse_hash_set</tt>.</p>
+
+<tt><A href="http://www.sgi.com/tech/stl/hash_set.html">hash_set</A></tt>,
+<A href="http://www.sgi.com/tech/stl/AssociativeContainer.html">Associative Container</A>,
+<A href="http://www.sgi.com/tech/stl/HashedAssociativeContainer.html">Hashed Associative Container</A>, 
+<A href="http://www.sgi.com/tech/stl/SimpleAssociativeContainer.html">Simple Associative Container</A>,
+<A href="http://www.sgi.com/tech/stl/UniqueHashedAssociativeContainer.html">Unique Hashed Associative Container</A>, 
+<tt><A href="http://www.sgi.com/tech/stl/set.html">set</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/Map.html">map</A></tt>
+<tt><A href="http://www.sgi.com/tech/stl/multiset.html">multiset</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/Multimap.html">multimap</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/hash_map.html">hash_map</A></tt>, 
+<tt><A href="http://www.sgi.com/tech/stl/hash_multiset.html">hash_multiset</A></tt>,
+<tt><A href="http://www.sgi.com/tech/stl/hash_multimap.html">hash_multimap</A></tt>,
+<tt><A href="sparsetable.html">sparsetable</A></tt>,
+<tt><A href="sparse_hash_map.html">sparse_hash_map</A></tt>,
+<tt><A href="dense_hash_set.html">dense_hash_set</A></tt>,
+<tt><A href="dense_hash_map.html">dense_hash_map</A></tt>
+
+</BODY>
+</HTML> 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/INSTALL
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/INSTALL	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/INSTALL	(revision 2162)
@@ -0,0 +1,245 @@
+Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
+Foundation, Inc.
+
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+
+Non-generic Instructions
+========================
+
+You can specify in what namespace the google hashtable routines
+(sparse_hash_map et al.) will be defined.  The default is to define
+them in std.  To define them in another namespace, run with
+
+   --enable-namespace=another_namespace
+
+To define the hashtable routines in the main namespace (that is, in no
+namespace at all), run with
+
+   --disable-namespace
+
+
+Basic Installation
+==================
+
+   These are generic installation instructions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  While running, it prints some
+     messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory.  After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+   By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/sparsetable_unittest.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/sparsetable_unittest.vcproj	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/sparsetable_unittest.vcproj	(revision 2162)
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="sparsetable_unittest"
+	ProjectGUID="{AAF9EAEE-03FC-4789-8477-296295C9B6B5}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="5"
+				UsePrecompiledHeader="3"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="4"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/sparsetable_unittestd.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/sparsetable_unittestd.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="4"
+				UsePrecompiledHeader="3"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/sparsetable_unittest.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="FALSE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\src\sparsetable_unittest.cc">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories="./src"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories="./src"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Include Files">
+			<File
+				RelativePath=".\src\google\sparsehash\config.h">
+			</File>
+			<File
+				RelativePath=".\src\google\sparsehash\densehashtable.h">
+			</File>
+			<File
+				RelativePath=".\src\google\sparsehash\hash_fun.h">
+			</File>
+			<File
+				RelativePath=".\src\google\sparsehash\sparsehashtable.h">
+			</File>
+			<File
+				RelativePath=".\src\google\sparsehash\std_hash_fun.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/COPYING
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/COPYING	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/COPYING	(revision 2162)
@@ -0,0 +1,28 @@
+Copyright (c) 2005, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+    * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/Makefile.am
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/Makefile.am	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/Makefile.am	(revision 2162)
@@ -0,0 +1,92 @@
+## Process this file with automake to produce Makefile.in       
+
+# Make sure that when we re-make ./configure, we get the macros we need
+ACLOCAL_AMFLAGS = -I `pwd`/../autoconf
+
+# This is so we can #include <google/foo>
+AM_CPPFLAGS = -I$(top_srcdir)/src
+
+googleincludedir = $(includedir)/google
+## The .h files you want to install (that is, .h files that people
+## who install this package can include in their own applications.)
+googleinclude_HEADERS =				\
+   src/google/dense_hash_map			\
+   src/google/dense_hash_set			\
+   src/google/sparse_hash_map			\
+   src/google/sparse_hash_set			\
+   src/google/sparsetable
+
+docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION)
+## This is for HTML and other documentation you want to install.
+## Add your documentation files (in doc/) in addition to these boilerplate
+## Also add a TODO file if you have one
+dist_doc_DATA = AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \
+   doc/dense_hash_map.html			\
+   doc/dense_hash_set.html			\
+   doc/sparse_hash_map.html			\
+   doc/sparse_hash_set.html			\
+   doc/sparsetable.html                     	\
+   doc/implementation.html			\
+   doc/performance.html
+
+## The libraries (.so's) you want to install
+lib_LTLIBRARIES =
+
+## unittests you want to run when people type 'make check'.
+## TESTS is for binary unittests, check_SCRIPTS for script-based unittests.
+## TESTS_ENVIRONMENT sets environment variables for when you run unittest,
+## but it only seems to take effect for *binary* unittests (argh!)
+TESTS = sparsetable_unittest hashtable_unittest
+check_SCRIPTS =
+TESTS_ENVIRONMENT =
+
+## This should always include $(TESTS), but may also include other
+## binaries that you compile but don't want automatically installed.
+noinst_PROGRAMS = $(TESTS) time_hash_map
+
+
+## vvvv RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS
+
+# This doesn't include the config.h file, but everything else we make
+configure_generated_h_files =			\
+   src/google/sparsehash/hash_fun.h		\
+   src/hash_map.h
+
+sparsehashincludedir = $(googleincludedir)/sparsehash
+sparsehashinclude_HEADERS =			\
+   src/google/sparsehash/hash_fun.h		\
+   src/google/sparsehash/densehashtable.h	\
+   src/google/sparsehash/sparsehashtable.h	\
+   src/google/sparsehash/config.h
+
+sparsetable_unittest_SOURCES =			\
+   src/sparsetable_unittest.cc			\
+   src/google/sparsehash/config.h		\
+   src/google/sparsetable			\
+   src/sparsetable_unittest.expected
+
+hashtable_unittest_SOURCES =			\
+   src/hashtable_unittest.cc			\
+   $(googleinclude_HEADERS)			\
+   $(sparsehashinclude_HEADERS)			\
+   src/words
+
+time_hash_map_SOURCES =				\
+   src/time_hash_map.cc				\
+   src/google/sparsehash/config.h		\
+   src/hash_map.h				\
+   $(googleinclude_HEADERS)
+
+## ^^^^ END OF RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS
+
+
+rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec
+	@cd packages && ./rpm.sh ${PACKAGE} ${VERSION}
+
+deb: dist-gzip packages/deb.sh packages/deb/*
+	@cd packages && ./deb.sh ${PACKAGE} ${VERSION}
+
+EXTRA_DIST = packages/rpm.sh packages/rpm/rpm.spec packages/deb.sh packages/deb \
+             src/config.h.include src/windows experimental
+
+DISTCLEANFILES = $(configure_generated_h_files)
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/missing
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/missing	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/missing	(revision 2162)
@@ -0,0 +1,336 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing 0.4 - GNU automake"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+       # We have makeinfo, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  tar)
+    shift
+    if test -n "$run"; then
+      echo 1>&2 "ERROR: \`tar' requires --run"
+      exit 1
+    fi
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case "$firstarg" in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case "$firstarg" in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequirements for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/aclocal.m4
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/aclocal.m4	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/aclocal.m4	(revision 2162)
@@ -0,0 +1,1097 @@
+# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
+
+# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# Do all the work for Automake.                            -*- Autoconf -*-
+
+# This macro actually does too much some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 8
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+AC_PREREQ([2.52])
+
+# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
+# the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
+ AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_][CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_][CC],
+                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_][CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_][CXX],
+                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+# Copyright 2002  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+	 [AM_AUTOMAKE_VERSION([1.6.3])])
+
+# Helper functions for option handling.                    -*- Autoconf -*-
+
+# Copyright 2001, 2002  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+#  -*- Autoconf -*-
+
+
+# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# AM_AUX_DIR_EXPAND
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+# Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# serial 4						-*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    echo '#include "conftest.h"' > conftest.c
+    echo 'int i;' > conftest.h
+    echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=conftest.c object=conftest.o \
+       depfile=conftest.Po tmpdepfile=conftest.TPo \
+       $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+       grep conftest.h conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      am_cv_$1_dependencies_compiler_type=$depmode
+      break
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+  DEPDIR=.deps
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  DEPDIR=_deps
+fi
+rmdir .deps 2>/dev/null
+AC_SUBST([DEPDIR])
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking Speeds up one-time builds
+  --enable-dependency-tracking  Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking.   -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+  # Strip MF so we end up with the name of the file.
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
+  # Check whether this is an Automake generated Makefile or not.
+  # We used to match only the files named `Makefile.in', but
+  # some people rename them; so instead we look at the file content.
+  # Grep'ing the first line is not enough: some people post-process
+  # each Makefile.in and add a new line on top of each file to say so.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # We invoke sed twice because it is the simplest approach to
+  # changing $(DEPDIR) to its actual value in the expansion.
+  for file in `sed -n -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+	s/\\\\$//
+	p
+	n
+	/\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+    # Make sure the directory exists.
+    test -f "$dirpart/$file" && continue
+    fdir=`AS_DIRNAME(["$file"])`
+    AS_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+	@echo done
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST(am__include)
+AC_SUBST(am__quote)
+AC_MSG_RESULT($_am_result)
+rm -f confinc confmf
+])
+
+# AM_CONDITIONAL                                              -*- Autoconf -*-
+
+# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 5
+
+AC_PREREQ(2.52)
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([conditional \"$1\" was never defined.
+Usually this means the macro was only invoked conditionally.])
+fi])])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
+
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_PREREQ([2.52])
+
+# serial 6
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  We must strip everything past the first ":",
+# and everything past the last "/".
+
+# _AM_DIRNAME(PATH)
+# -----------------
+# Like AS_DIRNAME, only do it during macro expansion
+AC_DEFUN([_AM_DIRNAME],
+       [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
+	      m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
+		    m4_if(regexp([$1], [^/.*]), -1,
+			  [.],
+			  patsubst([$1], [^\(/\).*], [\1])),
+		    patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
+	      patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
+])# _AM_DIRNAME
+
+
+# The stamp files are numbered to have different names.
+# We could number them on a directory basis, but that's additional
+# complications, let's have a unique counter.
+m4_define([_AM_STAMP_Count], [0])
+
+
+# _AM_STAMP(HEADER)
+# -----------------
+# The name of the stamp file for HEADER.
+AC_DEFUN([_AM_STAMP],
+[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
+AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
+                               [:.*])))/stamp-h[]_AM_STAMP_Count])
+
+
+# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
+# ------------------------------------------------------------
+# We used to try to get a real timestamp in stamp-h.  But the fear is that
+# that will cause unnecessary cvs conflicts.
+AC_DEFUN([_AM_CONFIG_HEADER],
+[# Add the stamp file to the list of files AC keeps track of,
+# along with our hook.
+AC_CONFIG_HEADERS([$1],
+                  [# update the timestamp
+echo 'timestamp for $1' >"_AM_STAMP([$1])"
+$2],
+                  [$3])
+])# _AM_CONFIG_HEADER
+
+
+# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
+# --------------------------------------------------------------
+AC_DEFUN([AM_CONFIG_HEADER],
+[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
+])# AM_CONFIG_HEADER
+
+# Figures out where hash_map is defined, and then writes out the
+# location to a header file specified in $1.  The output file also
+# #defines the namespace that hash_map is in HASH_NAMESPACE.
+#
+# You can use this *instead of* stl_hash.ac.  stl_hash.ac will
+# also define HASH_NAMESPACE, and vars indicating where hash_map
+# lives, but won't actually make an include file for you.  This
+# routine is a higher-level wrapper around hash_map.
+
+AC_DEFUN([AC_CXX_MAKE_HASH_MAP_H],
+  [AC_REQUIRE([AC_CXX_STL_HASH])
+   AC_MSG_CHECKING(writing a helper file for including hash_map)
+
+   AS_MKDIR_P([`AS_DIRNAME([$1])`])
+   cat >$1 <<EOF
+#include $ac_cv_cxx_hash_map
+#ifndef HASH_NAMESPACE
+#define HASH_NAMESPACE $ac_cv_cxx_hash_namespace
+#endif
+EOF
+
+   AC_MSG_RESULT([$1])
+])
+
+# We check two things: where the include file is for hash_map, and
+# what namespace hash_map lives in within that include file.  We
+# include AC_TRY_COMPILE for all the combinations we've seen in the
+# wild.  We define one of HAVE_HASH_MAP or HAVE_EXT_HASH_MAP depending
+# on location, and HASH_NAMESPACE to be the namespace hash_map is
+# defined in.  If we can't find a hash_map that works, we die!
+
+AC_DEFUN([AC_CXX_STL_HASH],
+  [AC_CACHE_CHECK(
+      location of STL hash_map,
+      ac_cv_cxx_stl_hash,
+      [AC_REQUIRE([AC_CXX_NAMESPACES])
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include <hash_map>],
+                     [hash_map<int, int> t; return 0;],
+                     ac_cv_cxx_stl_hash=hash_map)
+      AC_TRY_COMPILE([#include <ext/hash_map>],
+                     [__gnu_cxx::hash_map<int, int> t; return 0;],
+                     ac_cv_cxx_stl_hash=ext_hash_map)
+      AC_TRY_COMPILE([#include <hash_map>],
+                     [std::hash_map<int, int> t; return 0;],
+                     ac_cv_cxx_stl_hash=std_hash_map)
+      AC_TRY_COMPILE([#include <hash_map>],
+                     [stdext::hash_map<int, int> t; return 0;],
+                     ac_cv_cxx_stl_hash=stdext_hash_map)
+
+      AC_LANG_RESTORE])
+   if test "$ac_cv_cxx_stl_hash" = hash_map; then
+      AC_DEFINE(HAVE_HASH_MAP, 1, [define if the compiler has hash_map])
+      AC_DEFINE(HAVE_HASH_SET, 1, [define if the compiler has hash_set])
+      ac_cv_cxx_hash_map="<hash_map>"
+      ac_cv_cxx_hash_set="<hash_set>"
+      ac_cv_cxx_hash_namespace=""
+   fi
+   if test "$ac_cv_cxx_stl_hash" = ext_hash_map; then
+      AC_DEFINE(HAVE_EXT_HASH_MAP, 1, [define if the compiler has hash_map])
+      AC_DEFINE(HAVE_EXT_HASH_SET, 1, [define if the compiler has hash_set])
+      ac_cv_cxx_hash_map="<ext/hash_map>"
+      ac_cv_cxx_hash_set="<ext/hash_set>"
+      ac_cv_cxx_hash_namespace="__gnu_cxx"
+   fi
+   if test "$ac_cv_cxx_stl_hash" = std_hash_map; then
+      AC_DEFINE(HAVE_HASH_MAP, 1, [define if the compiler has hash_map])
+      AC_DEFINE(HAVE_HASH_SET, 1, [define if the compiler has hash_set])
+      ac_cv_cxx_hash_map="<hash_map>"
+      ac_cv_cxx_hash_set="<hash_set>"
+      ac_cv_cxx_hash_namespace="std"
+   fi
+   if test "$ac_cv_cxx_stl_hash" = stdext_hash_map; then
+      AC_DEFINE(HAVE_HASH_MAP, 1, [define if the compiler has hash_map])
+      AC_DEFINE(HAVE_HASH_SET, 1, [define if the compiler has hash_set])
+      ac_cv_cxx_hash_map="<hash_map>"
+      ac_cv_cxx_hash_set="<hash_set>"
+      ac_cv_cxx_hash_namespace="stdext"
+   fi
+   AC_DEFINE_UNQUOTED(HASH_NAMESPACE,$ac_cv_cxx_hash_namespace,
+                      [the namespace of hash_map])
+
+   if test x"$ac_cv_cxx_stl_hash" = x; then
+      AC_MSG_ERROR(couldn't find an STL hash_map)
+   fi
+])
+
+dnl @synopsis AC_CXX_NAMESPACES
+dnl
+dnl If the compiler can prevent names clashes using namespaces, define
+dnl HAVE_NAMESPACES.
+dnl
+dnl @category Cxx
+dnl @author Todd Veldhuizen
+dnl @author Luc Maisonobe <luc@spaceroots.org>
+dnl @version 2004-02-04
+dnl @license AllPermissive
+
+AC_DEFUN([AC_CXX_NAMESPACES],
+[AC_CACHE_CHECK(whether the compiler implements namespaces,
+ac_cv_cxx_namespaces,
+[AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
+                [using namespace Outer::Inner; return i;],
+ ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
+ AC_LANG_RESTORE
+])
+if test "$ac_cv_cxx_namespaces" = yes; then
+  AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
+fi
+])
+
+# Figures out where hash_fun (or stl_hash_fun) is defined, and then
+# writes out the location to the file specified in $1.
+# The output file also #defines the namespace that hash_fun is in
+# HASH_NAMESPACE.
+#
+# You can use this *instead of* stl_hash_fun.ac.  stl_hash_fun.ac will
+# also define vars indicating where hash_fun lives, but won't actually
+# make an include file for you.  This routine is a higher-level
+# wrapper around hash_fun.ac.
+#
+# If we can't find hash_fun.h, we copy in our own private copy of
+# sgi's stl_hash_fun.h into the file instead.
+
+AC_DEFUN([AC_CXX_MAKE_HASH_FUN_H],
+  [AC_REQUIRE([AC_CXX_STL_HASH_FUN])
+   AC_REQUIRE([AC_CXX_STL_HASH])
+   AC_MSG_CHECKING(writing an include-helper for hash_fun.h)
+
+   AS_MKDIR_P([`AS_DIRNAME([$1])`])
+   cat >$1 <<EOF
+#ifndef HASH_NAMESPACE
+#define HASH_NAMESPACE $ac_cv_cxx_hash_namespace
+#endif
+
+EOF
+   if test -n "$ac_cv_cxx_stl_hash_fun"; then
+     echo "#include $ac_cv_cxx_stl_hash_fun" >> $1
+   else
+     cat $srcdir/src/windows/stl_hash_fun.h >> $1
+   fi
+
+   AC_MSG_RESULT([$1])
+])
+
+# We just try to figure out where hash<> is defined.  It's in some file
+# that ends in hash_fun.h...
+#
+# We use our knowledge of configure to know that the $ac_header holds
+# the header that's found when the conditional text executes.  We make
+# use of that fact, which perhaps we shouldn't...
+
+# Ideally we'd use AC_CACHE_CHECK, but we want to call AC_CHECK_HEADERS which
+# prints messages itself, so instead we implement AC_CACHE_CHECK manually
+# via AC_MSG_CHECKING + AC_CACHE_VAL + AC_MSG_RESULT
+
+AC_DEFUN([AC_CXX_STL_HASH_FUN],
+  [AC_REQUIRE([AC_CXX_NAMESPACES])
+   AC_LANG_SAVE
+   AC_LANG_CPLUSPLUS
+   AC_CHECK_HEADERS(stl_hash_fun.h ext/stl_hash_fun.h \
+                    ext/hash_fun.h hash_fun.h,
+                    [ac_cv_cxx_stl_hash_fun="<$ac_header>"; break])
+   AC_LANG_RESTORE
+   AC_MSG_CHECKING(how to include hash_fun directly)
+   AC_MSG_RESULT([$ac_cv_cxx_stl_hash_fun])
+])
+
+# We check what namespace stl code like vector expects to be executed in
+
+AC_DEFUN([AC_CXX_STL_NAMESPACE],
+  [AC_CACHE_CHECK(
+      what namespace STL code is in,
+      ac_cv_cxx_stl_namespace,
+      [AC_REQUIRE([AC_CXX_NAMESPACES])
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include <vector>],
+                     [vector<int> t; return 0;],
+                     ac_cv_cxx_stl_namespace=none)
+      AC_TRY_COMPILE([#include <vector>],
+                     [std::vector<int> t; return 0;],
+                     ac_cv_cxx_stl_namespace=std)
+      AC_LANG_RESTORE])
+   if test "$ac_cv_cxx_stl_namespace" = none; then
+      AC_DEFINE(STL_NAMESPACE,,
+                [the namespace where STL code like vector<> is defined])
+   fi
+   if test "$ac_cv_cxx_stl_namespace" = std; then
+      AC_DEFINE(STL_NAMESPACE,std,
+                [the namespace where STL code like vector<> is defined])
+   fi
+])
+
+# Allow users to override the namespace we define our application's classes in
+# Arg $1 is the default namespace to use if --enable-namespace isn't present.
+
+# In general, $1 should be 'google', so we put all our exported symbols in a
+# unique namespace that is not likely to conflict with anyone else.  However,
+# when it makes sense -- for instance, when publishing stl-like code -- you
+# may want to go with a different default, like 'std'.
+
+AC_DEFUN([AC_DEFINE_GOOGLE_NAMESPACE],
+  [google_namespace_default=[$1]
+   AC_ARG_ENABLE(namespace, [--enable-namespace=FOO to define these Google
+                             classes in the FOO namespace. --disable-namespace
+                             to define them in the global namespace. Default
+                             is to define them in std.],
+                 [case "$enableval" in
+                    yes) google_namespace="$google_namespace_default" ;;
+                     no) google_namespace="" ;;
+                      *) google_namespace="$enableval" ;;
+                  esac],
+                 [google_namespace="$google_namespace_default"])
+   if test -n "$google_namespace"; then
+     AC_DEFINE_UNQUOTED(GOOGLE_NAMESPACE, $google_namespace,
+                        Namespace for Google classes)
+     AC_DEFINE(_START_GOOGLE_NAMESPACE_, [ namespace GOOGLE_NAMESPACE { ],
+               Puts following code inside the Google namespace)
+     AC_DEFINE(_END_GOOGLE_NAMESPACE_, [ } ],
+               Stops putting the code inside the Google namespace)
+   else
+     AC_DEFINE(GOOGLE_NAMESPACE,,
+               Namespace for Google classes)
+     AC_DEFINE(_START_GOOGLE_NAMESPACE_,,
+               Puts following code inside the Google namespace)
+     AC_DEFINE(_END_GOOGLE_NAMESPACE_,,
+               Stops putting the code inside the Google namespace)
+   fi
+])
+
+# Checks whether the STL implementation used by this C++ compiler understands
+# iterator tags, which are typedefs that say what the iterator can do
+# (just ++, or random access, or what).
+#
+# Unfortunately, I don't know how to use $ac_cv_cxx_stl_namespace from
+# stl_namespace.m4, so I just re-implement it.  Ugh.
+ 
+AC_DEFUN([AC_CXX_STL_ITERATOR_TAGS],
+  [AC_CACHE_CHECK(
+      whether STL supports iterator-tags,
+      ac_cv_cxx_stl_iterator_tags,
+      [AC_REQUIRE([AC_CXX_STL_NAMESPACE])
+       AC_LANG_SAVE
+       AC_LANG_CPLUSPLUS
+       AC_TRY_COMPILE([#include <list>],
+                      [list<int>::iterator::iterator_category c; return 0;],
+                      ac_cv_cxx_stl_iterator_tags=yes)
+       AC_TRY_COMPILE([#include <list>],
+                      [std::list<int>::iterator::iterator_category c; return 0;],
+                      ac_cv_cxx_stl_iterator_tags=yes)
+       AC_LANG_RESTORE])
+   if test "$ac_cv_cxx_stl_iterator_tags" = yes; then
+     AC_DEFINE(UNDERSTANDS_ITERATOR_TAGS, 1,
+               [does STL support iterator-tags?])
+   fi
+])
+
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/install-sh
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/install-sh	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/sparsehash/install-sh	(revision 2162)
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+	-c) instcmd="$cpprog"
+	    shift
+	    continue;;
+
+	-d) dir_arg=true
+	    shift
+	    continue;;
+
+	-m) chmodcmd="$chmodprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-o) chowncmd="$chownprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-g) chgrpcmd="$chgrpprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-s) stripcmd="$stripprog"
+	    shift
+	    continue;;
+
+	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+	    shift
+	    continue;;
+
+	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+	    shift
+	    continue;;
+
+	*)  if [ x"$src" = x ]
+	    then
+		src=$1
+	    else
+		# this colon is to work around a 386BSD /bin/sh bug
+		:
+		dst=$1
+	    fi
+	    shift
+	    continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+	echo "install:	no input file specified"
+	exit 1
+else
+	:
+fi
+
+if [ x"$dir_arg" != x ]; then
+	dst=$src
+	src=""
+	
+	if [ -d $dst ]; then
+		instcmd=:
+		chmodcmd=""
+	else
+		instcmd=$mkdirprog
+	fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+	if [ -f "$src" ] || [ -d "$src" ]
+	then
+		:
+	else
+		echo "install:  $src does not exist"
+		exit 1
+	fi
+	
+	if [ x"$dst" = x ]
+	then
+		echo "install:	no destination specified"
+		exit 1
+	else
+		:
+	fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+	if [ -d $dst ]
+	then
+		dst="$dst"/`basename $src`
+	else
+		:
+	fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+	'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+	pathcomp="${pathcomp}${1}"
+	shift
+
+	if [ ! -d "${pathcomp}" ] ;
+        then
+		$mkdirprog "${pathcomp}"
+	else
+		:
+	fi
+
+	pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+	$doit $instcmd $dst &&
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+	if [ x"$transformarg" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		dstfile=`basename $dst $transformbasename | 
+			sed $transformarg`$transformbasename
+	fi
+
+# don't allow the sed command to completely eliminate the filename
+
+	if [ x"$dstfile" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		:
+	fi
+
+# Make a temp file name in the proper directory.
+
+	dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd $src $dsttmp &&
+
+	trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
+
+# Now rename the file to the real destination.
+
+	$doit $rmcmd -f $dstdir/$dstfile &&
+	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
