src/GRAPHGEN/graph_code_generator.cpp
// This function generates forest code using numerical labels starting from start_id and returns 
// the last used_id.
This function generates forest code using numerical labels starting from start_id and returns
the last used_id.
This function generates forest code using numerical labels starting from start_id and returns the last used_id .
size_t GenerateLineForestCode(std::ostream& os, 
                              const LineForestHandler& lfh,
                              std::string prefix,
                              size_t start_id,
                              BEFORE_AFTER_FUNC(before_main),
                              BEFORE_AFTER_FUNC(after_main),
                              BEFORE_AFTER_FUNC(before_end),
                              BEFORE_AFTER_FUNC(after_end))
{
    size_t last_id = GenerateDragCode(os, lfh.f_, true, before_main, after_main, prefix, start_id, lfh.main_end_tree_mapping_);
    for (size_t i = 0; i < lfh.end_forests_.size(); ++i) {
        last_id = GenerateDragCode(os, lfh.end_forests_[i], false, before_end, after_end, prefix, last_id, lfh.main_end_tree_mapping_, i);
    }
    return last_id;
}
size_t GenerateLineForestCode ( std :: ostream & os , const LineForestHandler & lfh , std :: string prefix , size_t start_id , BEFORE_AFTER_FUNC ( before_main ) , BEFORE_AFTER_FUNC ( after_main ) , BEFORE_AFTER_FUNC ( before_end ) , BEFORE_AFTER_FUNC ( after_end ) ) { size_t last_id = GenerateDragCode ( os , lfh . f_ , true , before_main , after_main , prefix , start_id , lfh . main_end_tree_mapping_ ) ; for ( size_t i = 0 ; i < lfh . end_forests_ . size ( ) ; ++ i ) { last_id = GenerateDragCode ( os , lfh . end_forests_ [ i ] , false , before_end , after_end , prefix , last_id , lfh . main_end_tree_mapping_ , i ) ; } return last_id ; }
This function generates forest code using numerical labels starting from start_id and returns
the last used_id.
This function generates forest code using numerical labels starting from start_id and returns the last used_id .
// Generate the code for the main forest // Generate the code for the end of the line forests