RC-PoR-P-Source-cod/RC-PoR-P.cpp
int find_index(bigint* set, int set_size, bigint val, bool &res_, int offset){

  int res;
  for(int i = offset-1; i < set_size; i++){
    if (mpz_cmp(set[i], val) == 0){
      res_ = true;
      return i;// 0 means val exists in the set
    }
  }
  res_ = false;
  return 0;
}
//===============================
// description: finds an index of a value: valu, in "set".
// This fubnction is called by the proof generation fubnction to locate a node's index given its value.
finds an index of a value: valu, in "set".
This fubnction is called by the proof generation fubnction to locate a node's index given its value.
finds an index of a value : valu in " set " . This fubnction is called by the proof generation fubnction to locate a node ' s index given its value .
int find_index(bigint* set, int set_size, bigint val, bool &res_, int offset){
  int res;
  for(int i = offset-1; i < set_size; i++){
    if (mpz_cmp(set[i], val) == 0){
      res_ = true;
      return i;
    }
  }
  res_ = false;
  return 0;
}
int find_index ( bigint * set , int set_size , bigint val , bool & res_ , int offset ) { int res ; for ( int i = offset - 1 ; i < set_size ; i ++ ) { if ( mpz_cmp ( set [ i ] , val ) == 0 ) { res_ = true ; return i ; } } res_ = false ; return 0 ; }
description: finds an index of a value: valu, in "set".
description : finds an index of a value : valu in " set " .
// 0 means val exists in the set