// file: dtn_compute_4.cc
//

// isip include files
//
#include "dt_node.h"
#include "dt_node_constants.h"

// method:  compute_occupancy_cc
//                                                        
// arguments:
//   float_4* occupy: (input) state occupancies
//
// return: a float_4 number of occupancy
//

// this methods compute the sum of the state occupancy of all the states
// at this node
//
float_4 Dt_node::compute_occupancy_cc(float_4* occupy_a) {

  float_4 sum_occupy = 0;
  
  // compute the sum of occupancy
  //
  for (int_4 i= 0; i < num_states_d; i++) {
    sum_occupy += occupy_a[state_index_d[i]];
  }

  // exit gracefully
  //
  return sum_occupy;
}
