src/header.cpp
size_t convertAdjMatToVector(
    IntegerMatrix gene_interaction, std::vector<size_t>& tgtGene,
    std::vector<std::pair<size_t,size_t> >& intSrcType){
  size_t nGene = gene_interaction.nrow();
  size_t nInteractions = 0;
  //  Rcout<<nGene<<"\n";
  for(size_t tmpTgtGene = 0; tmpTgtGene < nGene; tmpTgtGene++ ){
    for(size_t tmpSrcGene = 0; tmpSrcGene < nGene; tmpSrcGene++ ){
      if(gene_interaction(tmpTgtGene,tmpSrcGene) > 0){
        nInteractions++;
        tgtGene.push_back(tmpTgtGene);
        intSrcType.push_back(
          std::make_pair(tmpSrcGene,(gene_interaction(tmpTgtGene,tmpSrcGene))));

      }
    }
  }
  return nInteractions;
}
// function to convert gene_interaction matrix to vector of vectors
// source_gene vector will contain the sources of interactions
// interactionType will contain the type of interaction
function to convert gene_interaction matrix to vector of vectors
source_gene vector will contain the sources of interactions
interactionType will contain the type of interaction
function to convert gene_interaction matrix to vector of vectors source_gene vector will contain the sources of interactions interactionType will contain the type of interaction
size_t convertAdjMatToVector(
    IntegerMatrix gene_interaction, std::vector<size_t>& tgtGene,
    std::vector<std::pair<size_t,size_t> >& intSrcType){
  size_t nGene = gene_interaction.nrow();
  size_t nInteractions = 0;
  for(size_t tmpTgtGene = 0; tmpTgtGene < nGene; tmpTgtGene++ ){
    for(size_t tmpSrcGene = 0; tmpSrcGene < nGene; tmpSrcGene++ ){
      if(gene_interaction(tmpTgtGene,tmpSrcGene) > 0){
        nInteractions++;
        tgtGene.push_back(tmpTgtGene);
        intSrcType.push_back(
          std::make_pair(tmpSrcGene,(gene_interaction(tmpTgtGene,tmpSrcGene))));
      }
    }
  }
  return nInteractions;
}
size_t convertAdjMatToVector ( IntegerMatrix gene_interaction , std :: vector < size_t > & tgtGene , std :: vector < std :: pair < size_t , size_t > > & intSrcType ) { size_t nGene = gene_interaction . nrow ( ) ; size_t nInteractions = 0 ; for ( size_t tmpTgtGene = 0 ; tmpTgtGene < nGene ; tmpTgtGene ++ ) { for ( size_t tmpSrcGene = 0 ; tmpSrcGene < nGene ; tmpSrcGene ++ ) { if ( gene_interaction ( tmpTgtGene , tmpSrcGene ) > 0 ) { nInteractions ++ ; tgtGene . push_back ( tmpTgtGene ) ; intSrcType . push_back ( std :: make_pair ( tmpSrcGene , ( gene_interaction ( tmpTgtGene , tmpSrcGene ) ) ) ) ; } } } return nInteractions ; }
function to convert gene_interaction matrix to vector of vectors
source_gene vector will contain the sources of interactions
interactionType will contain the type of interaction
function to convert gene_interaction matrix to vector of vectors source_gene vector will contain the sources of interactions interactionType will contain the type of interaction
//  Rcout<<nGene<<"\n";