Custom Solver
// Copyright 2009 ESRI
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
// You may freely redistribute and use this sample code, with or
// without modification, provided you include the original copyright
// notice and use restrictions.
// See the use restrictions.

#pragma once

#include <vector>
#include <stack>
#include <hash_map>

using namespace std;
using namespace stdext;

struct segmentRecord
  segmentRecord(double from, double to)
   : fromPosition(from),

  double fromPosition;
  double toPosition;

typedef vector<bool> connectivity_bitmap;
typedef stack<long> junction_stack;
typedef hash_multimap<long, segmentRecord> segment_hash;
typedef pair<long, segmentRecord> segment_entry;
typedef pair<segment_hash::const_iterator, segment_hash::const_iterator> oid_bucket;