// file: inst_frame_2.cc
//

// isip include files
//
#include "instance.h"
#include "instance_constants.h"

// method: active_cc
//
// arguments:
//  int_4 frame: (input) the current frame index
//  int_4 diff: (input) the activation threshold
//
// return: a logical_1 indicating status
//
// this method compares the input frame with the active frame index
// and determines how long since this instance has been active, and
// returns true or false depending on whether that is less or more
// than the allowed limit
//
logical_1 Instance::active_cc(int_4 frame_a, int_4 diff_a) {

  // output flag
  //
  logical_1 flag = ISIP_TRUE;
  
  // compare the frame index and set flag
  //
  if (frame_a - frame_d > diff_a) {
    flag = ISIP_FALSE;
  }
  
  // exit gracefully
  //
  return flag;
}
