// file: $isip/class/search/StackSearch/ssrch_07.cc
// version: $Id: ssrch_07.cc 9742 2004-08-20 20:43:15Z may $
//

// isip include files
//
#include "StackSearch.h"

// method: setNumLevels
//
// arguments:
//  long num_levels: (input) the number of levels to use
//
// return: logical error status
//
// set the number of search levels
//
boolean StackSearch::setNumLevels(long num_levels_a) {

  // check for out of range args
  //
  if (num_levels_a < 1) {
    return false;
  }

  // set the search levels
  //
  h_digraph_d->setLength(num_levels_a, false);
  for (long i = 0; i < num_levels_a; i++) {
    (*h_digraph_d)(i).setLevelIndex(i);
  }

  // set the trace lists
  //
  trace_lists_d.setLength(num_levels_a, false);
  for (long i = 0; i < num_levels_a; i++) {
    trace_lists_d(i).setAllocationMode(DstrBase::USER);
  }

  // exit gracefully
  //
  return true;
}

