Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ntreepic.C File Reference

Generate LaTeX/eepic pictures of n-ary (general) trees. More...

#include <iostream>
#include <fstream>
#include <string>
#include <tpl_dynArray.H>
#include <tpl_dynDlist.H>
#include <tpl_tree_node.H>
#include <utility>
#include <argp.h>
#include "parse_utils.H"
#include "treepic_utils.H"
#include "ah-errors.H"
Include dependency graph for ntreepic.C:

Go to the source code of this file.

Classes

struct  Tag_Data
 
struct  Arc_Data
 
struct  Connexion_Data
 
struct  Tree_Data
 

Macros

#define BLANK   " "
 
#define X(p)   ((p)->get_key().x)
 
#define Y(p)   ((p)->get_key().y)
 
#define PRE(p)   ((p)->get_key().pre)
 
#define MOD(p)   ((p)->get_key().mod)
 
#define SUMMOD(p)   ((p)->get_key().sum_mod)
 
#define STRING(p)   ((p)->get_key().str)
 
#define ISELLIPSE(p)   ((p)->get_key().ellipse)
 
#define ISRECTANGLE(p)   ((p)->get_key().rectangle)
 
#define XOFFSET(p)   ((p)->get_key().xoffset)
 
#define YOFFSET(p)   ((p)->get_key().yoffset)
 
#define XR(p)   ((p)->get_key().xr)
 
#define YR(p)   ((p)->get_key().yr)
 
#define XD(p)   ((p)->get_key().xd)
 
#define YD(p)   ((p)->get_key().yd)
 
#define POS(p)   ((p)->get_key().position)
 
#define MAXCHILDYR(p)   ((p)->get_key().max_child_yr)
 
#define YRGAP(p)   ((p)->get_key().yr_gap)
 
#define LEVEL(p)   ((p)->get_key().level)
 
#define CHILDNUMBER(p)   ((p)->get_key().child_number)
 
#define WIDTH(p)   ((p)->get_key().xd)
 
#define HEIGHT(p)   ((p)->get_key().yd)
 
#define SHADOW(p)   ((p)->get_key().shadow)
 
#define WITHOUTNODE(p)   ((p)->get_key().without_node)
 
#define WITHARC(p)   ((p)->get_key().with_arc)
 
#define DASHEDARC(p)   ((p)->get_key().dashed_arc)
 
#define ARCS(p)   ((p)->get_key().arc_list)
 
#define CONNEXIONS(p)   ((p)->get_key().connexion_list)
 
#define TAGS(p)   ((p)->get_key().tag_list)
 
#define TERMINATE(n)   (save_parameters(), exit(n))
 

Typedefs

typedef Token_Type Tag_Option
 
typedef Tree_Node< Tree_DataEepicNode
 

Enumerations

enum  Token_Type {
  ROOT , NODE , STRING , WITHOUT_NODE ,
  WITHOUT_ARC , XOFFSET , YOFFSET , HRADIO ,
  VRADIO , SHADOW , TAG , ARC ,
  DASHED_ARC , DASHED_CONNEXION , ELLIPSE , RECTANGLE ,
  COMMENT , END_FILE , NORTH , SOUTH ,
  EAST , WEST , NORTH_EAST , NORTH_WEST ,
  SOUTH_EAST , SOUTH_WEST , LEFT , RIGHT ,
  INVALID
}
 

Functions

void load_deway_number (ifstream &input_stream, int deway_array[], size_t deway_array_size)
 
Token_Type get_token (ifstream &input_stream)
 
EepicNodeallocate_node (const string &str)
 
EepicNodeparse_deway_number (ifstream &input_stream, EepicNode *root)
 
EepicNodeparse_key_node_and_allocate (ifstream &input_stream)
 
EepicNodeparse_first_root_definition (ifstream &input_stream)
 
void parse_root_definition (ifstream &input_stream, EepicNode *root)
 
void parse_node_definition (ifstream &input_stream, EepicNode *root)
 
void parse_hradio (ifstream &input_stream, EepicNode *root)
 
void parse_vradio (ifstream &input_stream, EepicNode *root)
 
void parse_without_node (ifstream &input_stream, EepicNode *root)
 
void parse_without_arc (ifstream &input_stream, EepicNode *root)
 
void parse_xoffset (ifstream &input_stream, EepicNode *root)
 
void parse_yoffset (ifstream &input_stream, EepicNode *root)
 
void parse_shadow (ifstream &input_stream, EepicNode *root)
 
void parse_tag (ifstream &input_stream, EepicNode *root)
 
void parse_arc (ifstream &input_stream, EepicNode *root)
 
void parse_dashed_arc (ifstream &input_stream, EepicNode *root)
 
void parse_connexion (ifstream &input_stream, EepicNode *root)
 
void parse_ellipse (ifstream &input_stream, EepicNode *root)
 
void parse_rectangle (ifstream &input_stream, EepicNode *root)
 
EepicNoderead_input_and_build_tree (ifstream &input_stream)
 
EepicNode__advance_to_rightmost_in_level (EepicNode *root, const int level, long double &sum)
 
EepicNodeadvance_to_rightmost_in_level (EepicNode *root, const int level, long double &sum)
 
EepicNode__advance_to_leftmost_in_level (EepicNode *root, const int level, long double &sum)
 
EepicNodeadvance_to_leftmost_in_level (EepicNode *root, const int level, long double &sum)
 
void adjust_minimal_separation_with_letf_sibling (EepicNode *p)
 
void precompute_x_for_node (EepicNode *p, const int level, const int child)
 
void compute_definitive_coordinates_for_node (EepicNode *p, int, int)
 
void precompute_x_coordinates_for_tree (EepicNode *root)
 
void compute_coordinates_for_tree (EepicNode *root)
 
void shift_tree_to_right (EepicNode *p, int, int)
 
void compute_coordinates_for_forest_and_set_picture_size (EepicNode *root)
 
void infix_tree (EepicNode *root)
 
void generate_prefix_traversal (ofstream &output, EepicNode *root)
 
void generate_infix_traversal (ofstream &output, EepicNode *root)
 
void generate_bin_tree (ofstream &output, EepicNode *root)
 
void generate_prologue (ofstream &output)
 
void generate_epilogue (ofstream &output)
 
void generate_curve (ofstream &output, EepicNode *p, EepicNode *q, const bool left=false, const bool is_dashed=true)
 
void generate_tree (ofstream &output, EepicNode *p, int level, int child_index)
 
void generate_forest (ofstream &output, EepicNode *root)
 
void save_parameters ()
 
void read_parameters ()
 
void print_parameters ()
 
static error_t parser_opt (int key, char *arg, struct argp_state *)
 
int main (int argc, char *argv[])
 

Variables

long double hr = 70
 
long double vr = 70
 
long double hd = 2 * hr
 
long double vd = 2 * vr
 
long double xgap = 70
 
long double ygap = 100
 
long double tree_gap = 90
 
long double h_size = 0
 
double v_size = 0
 
long double x_offset = 0
 
long double y_offset = font_height() / 2.0
 
long double x_picture_offset = 0
 
long double y_picture_offset = 0
 
std::string command_line
 
std::string input_file_name
 
std::string output_file_name
 
bool latex_header = false
 
bool ellipses = true
 
bool rectangles = false
 
bool draw_list_representation = false
 
bool generate_binary_tree = false
 
bool not_nodes = false
 
long double x_max = 0
 
long double y_max = 0
 
long double shift_size = 0
 
int tree_number = 0
 
const char * argp_program_version
 
const char * argp_program_bug_address = "lrleon@ula.ve"
 
static char doc [] = "ntreepic -- Aleph drawer for general rooted trees"
 
static char arg_doc [] = "-f input-file [-o output-file]\n"
 
static const char * hello
 
static const char license_text []
 
static struct argp_option options []
 
const char * parameters_file_name = "./.ntreepic"
 
static struct argp arg_defs = {options, parser_opt, arg_doc, doc, 0, 0, 0}
 

Detailed Description

Generate LaTeX/eepic pictures of n-ary (general) trees.

This utility program reads an n-ary tree specification and generates high-quality LaTeX code for visualizing general trees (trees where nodes can have any number of children). It's designed for creating publication-quality tree diagrams for academic papers, presentations, and educational materials.

What are N-ary Trees?

Unlike binary trees (where each node has at most 2 children), n-ary trees allow nodes to have any number of children. Examples include:

  • File systems: Directories with multiple subdirectories
  • Organizational charts: Managers with multiple subordinates
  • XML/HTML: Elements with multiple child elements
  • Syntax trees: Programming language parse trees

Key Features

Tree Structure

  • N-ary trees: Any number of children per node
  • Deway notation: Hierarchical addressing (1.2.3 = third child of second child of root)
  • Forest support: Visualize multiple trees in one diagram
  • Flexible layout: Automatic positioning with spacing control

Customization

  • Node shapes: Circles, ellipses, rectangles
  • Colors: Customizable node and edge colors
  • Edge styles: Solid, dashed, curved connections
  • Spacing: Configurable gaps between nodes and trees
  • Labels: Text labels for nodes and edges

Output Format

  • LaTeX/eepic: High-quality vector graphics
  • Scalable: Vector format, perfect for publications
  • Professional: Publication-ready appearance

Input Format (Deway Notation)

The input file uses Deway notation to specify tree structure:

Deway Notation

  • Indexing: This tool uses 0-based indices.
  • Tree roots in a forest: The first tree root is addressed as 0, the second as 1, and so on.
  • Children: Append the child index to the parent address.
  • Example: 0.1.2 = third child (index 2) of second child (index 1) of the root of the first tree (0).

Basic Commands

  • ROOT <key>: Start a new tree (a forest can contain multiple ROOT entries)
  • NODE <deway> <key>: Create a node as the rightmost child of the parent identified by <deway>
  • ARC <src> <tgt> / DASHED-ARC <src> <tgt>: Extra arcs between arbitrary nodes
  • DASHED-CONNEXION <src> <tgt> <L|R>: Curved/dashed connexion used in some representations

Styling Commands

  • HRADIO <deway> <percent>: Multiply the node horizontal radius by the given percentage
  • VRADIO <deway> <percent>: Multiply the node vertical radius by the given percentage
  • XOFFSET <deway> <offset> / YOFFSET <deway> <offset>: Per-node label offsets
  • WITHOUT-NODE <deway>: Do not draw the node shape
  • WITHOUT-ARC <parent> <child>: Disable the natural parent->child arc
  • SHADOW <deway>: Draw node with shadow
  • TAG <deway> "<text>" <N|S|E|W|NE|NW|SE|SW> <xoffset> <yoffset>

Forest Support

  • Multiple trees can be specified
  • Automatic horizontal spacing between trees
  • Useful for comparing tree structures

Usage

# Generate LaTeX/eepic from an input file
ntreepic -f input.tree
# Write to a specific output file
ntreepic -f input.tree -o output.eepic

If -o is not provided, the output defaults to the input base name with .eepic extension.

Example Input File

ROOT Root
NODE 0 Child1
NODE 0 Child2
NODE 0 Child3
NODE 0.0 Grandchild1
@ NODE
Definition graphpic.C:201
@ ROOT
Definition ntreepic.C:220

Applications

  • File system visualization: Directory structures
  • Organizational charts: Company hierarchies
  • Parse trees: Programming language syntax trees
  • Decision trees: Machine learning, game trees
  • Taxonomy: Biological classifications, categories
  • XML/HTML visualization: Document structure

Comparison with btreepic

Feature btreepic ntreepic
Tree type Binary only N-ary (any children)
Notation Node IDs Deway addresses
Complexity Simpler More flexible
Use case BSTs, heaps General trees, forests
See also
btreepic.C Binary tree visualization tool
graphpic.C Graph visualization tool
tpl_tree_node.H N-ary tree node structure
deway.C Deway notation demonstration
Author
Leandro Rabindranath León

Definition in file ntreepic.C.

Macro Definition Documentation

◆ ARCS

#define ARCS (   p)    ((p)->get_key().arc_list)

Definition at line 367 of file ntreepic.C.

◆ BLANK

#define BLANK   " "

Definition at line 185 of file ntreepic.C.

◆ CHILDNUMBER

#define CHILDNUMBER (   p)    ((p)->get_key().child_number)

Definition at line 360 of file ntreepic.C.

◆ CONNEXIONS

#define CONNEXIONS (   p)    ((p)->get_key().connexion_list)

Definition at line 368 of file ntreepic.C.

◆ DASHEDARC

#define DASHEDARC (   p)    ((p)->get_key().dashed_arc)

Definition at line 366 of file ntreepic.C.

◆ HEIGHT

#define HEIGHT (   p)    ((p)->get_key().yd)

Definition at line 362 of file ntreepic.C.

◆ ISELLIPSE

#define ISELLIPSE (   p)    ((p)->get_key().ellipse)

Definition at line 348 of file ntreepic.C.

◆ ISRECTANGLE

#define ISRECTANGLE (   p)    ((p)->get_key().rectangle)

Definition at line 349 of file ntreepic.C.

◆ LEVEL

#define LEVEL (   p)    ((p)->get_key().level)

Definition at line 359 of file ntreepic.C.

◆ MAXCHILDYR

#define MAXCHILDYR (   p)    ((p)->get_key().max_child_yr)

Definition at line 357 of file ntreepic.C.

◆ MOD

#define MOD (   p)    ((p)->get_key().mod)

Definition at line 345 of file ntreepic.C.

◆ POS

#define POS (   p)    ((p)->get_key().position)

Definition at line 356 of file ntreepic.C.

◆ PRE

#define PRE (   p)    ((p)->get_key().pre)

Definition at line 344 of file ntreepic.C.

◆ SHADOW

#define SHADOW (   p)    ((p)->get_key().shadow)

Definition at line 363 of file ntreepic.C.

◆ STRING

#define STRING (   p)    ((p)->get_key().str)

Definition at line 347 of file ntreepic.C.

◆ SUMMOD

#define SUMMOD (   p)    ((p)->get_key().sum_mod)

Definition at line 346 of file ntreepic.C.

◆ TAGS

#define TAGS (   p)    ((p)->get_key().tag_list)

Definition at line 369 of file ntreepic.C.

◆ TERMINATE

#define TERMINATE (   n)    (save_parameters(), exit(n))

Definition at line 1957 of file ntreepic.C.

◆ WIDTH

#define WIDTH (   p)    ((p)->get_key().xd)

Definition at line 361 of file ntreepic.C.

◆ WITHARC

#define WITHARC (   p)    ((p)->get_key().with_arc)

Definition at line 365 of file ntreepic.C.

◆ WITHOUTNODE

#define WITHOUTNODE (   p)    ((p)->get_key().without_node)

Definition at line 364 of file ntreepic.C.

◆ X

#define X (   p)    ((p)->get_key().x)

Definition at line 342 of file ntreepic.C.

◆ XD

#define XD (   p)    ((p)->get_key().xd)

Definition at line 354 of file ntreepic.C.

◆ XOFFSET

#define XOFFSET (   p)    ((p)->get_key().xoffset)

Definition at line 350 of file ntreepic.C.

◆ XR

#define XR (   p)    ((p)->get_key().xr)

Definition at line 352 of file ntreepic.C.

◆ Y

#define Y (   p)    ((p)->get_key().y)

Definition at line 343 of file ntreepic.C.

◆ YD

#define YD (   p)    ((p)->get_key().yd)

Definition at line 355 of file ntreepic.C.

◆ YOFFSET

#define YOFFSET (   p)    ((p)->get_key().yoffset)

Definition at line 351 of file ntreepic.C.

◆ YR

#define YR (   p)    ((p)->get_key().yr)

Definition at line 353 of file ntreepic.C.

◆ YRGAP

#define YRGAP (   p)    ((p)->get_key().yr_gap)

Definition at line 358 of file ntreepic.C.

Typedef Documentation

◆ EepicNode

Definition at line 241 of file ntreepic.C.

◆ Tag_Option

Definition at line 237 of file ntreepic.C.

Enumeration Type Documentation

◆ Token_Type

enum Token_Type
Enumerator
ROOT 
NODE 
STRING 
WITHOUT_NODE 
WITHOUT_ARC 
XOFFSET 
YOFFSET 
HRADIO 
VRADIO 
SHADOW 
TAG 
ARC 
DASHED_ARC 
DASHED_CONNEXION 
ELLIPSE 
RECTANGLE 
COMMENT 
END_FILE 
NORTH 
SOUTH 
EAST 
WEST 
NORTH_EAST 
NORTH_WEST 
SOUTH_EAST 
SOUTH_WEST 
LEFT 
RIGHT 
INVALID 

Definition at line 218 of file ntreepic.C.

Function Documentation

◆ __advance_to_leftmost_in_level()

EepicNode * __advance_to_leftmost_in_level ( EepicNode root,
const int  level,
long double &  sum 
)

◆ __advance_to_rightmost_in_level()

EepicNode * __advance_to_rightmost_in_level ( EepicNode root,
const int  level,
long double &  sum 
)

◆ adjust_minimal_separation_with_letf_sibling()

void adjust_minimal_separation_with_letf_sibling ( EepicNode p)

◆ advance_to_leftmost_in_level()

EepicNode * advance_to_leftmost_in_level ( EepicNode root,
const int  level,
long double &  sum 
)

◆ advance_to_rightmost_in_level()

EepicNode * advance_to_rightmost_in_level ( EepicNode root,
const int  level,
long double &  sum 
)

◆ allocate_node()

EepicNode * allocate_node ( const string &  str)

Definition at line 550 of file ntreepic.C.

References STRING.

Referenced by parse_key_node_and_allocate().

◆ compute_coordinates_for_forest_and_set_picture_size()

void compute_coordinates_for_forest_and_set_picture_size ( EepicNode root)

◆ compute_coordinates_for_tree()

◆ compute_definitive_coordinates_for_node()

void compute_definitive_coordinates_for_node ( EepicNode p,
int  ,
int   
)

Definition at line 1158 of file ntreepic.C.

References Aleph::maps(), MAXCHILDYR, MOD, PRE, SUMMOD, X, x_max, XR, Y, y_max, ygap, YR, and YRGAP.

Referenced by compute_coordinates_for_tree().

◆ generate_bin_tree()

void generate_bin_tree ( ofstream &  output,
EepicNode root 
)

Definition at line 1287 of file ntreepic.C.

References generate_infix_traversal(), generate_prefix_traversal(), infix_tree(), Aleph::maps(), output, and root().

Referenced by main().

◆ generate_curve()

void generate_curve ( ofstream &  output,
EepicNode p,
EepicNode q,
const bool  left = false,
const bool  is_dashed = true 
)

Definition at line 1409 of file ntreepic.C.

References hr, Aleph::maps(), output, vr, X, xgap, XR, Y, ygap, and YPIC().

Referenced by generate_tree().

◆ generate_epilogue()

void generate_epilogue ( ofstream &  output)

Definition at line 1360 of file ntreepic.C.

References latex_header, Aleph::maps(), and output.

Referenced by generate_forest().

◆ generate_forest()

void generate_forest ( ofstream &  output,
EepicNode root 
)

Definition at line 1809 of file ntreepic.C.

References generate_epilogue(), generate_prologue(), generate_tree(), output, and root().

Referenced by main().

◆ generate_infix_traversal()

void generate_infix_traversal ( ofstream &  output,
EepicNode root 
)

Definition at line 1274 of file ntreepic.C.

References generate_infix_traversal(), output, root(), and STRING.

Referenced by generate_bin_tree(), and generate_infix_traversal().

◆ generate_prefix_traversal()

void generate_prefix_traversal ( ofstream &  output,
EepicNode root 
)

Definition at line 1262 of file ntreepic.C.

References generate_prefix_traversal(), output, POS, and root().

Referenced by generate_bin_tree(), and generate_prefix_traversal().

◆ generate_prologue()

void generate_prologue ( ofstream &  output)

◆ generate_tree()

◆ get_token()

◆ infix_tree()

void infix_tree ( EepicNode root)

Definition at line 1249 of file ntreepic.C.

References infix_tree(), POS, and root().

Referenced by generate_bin_tree(), and infix_tree().

◆ load_deway_number()

void load_deway_number ( ifstream &  input_stream,
int  deway_array[],
size_t  deway_array_size 
)
inline

◆ main()

◆ parse_arc()

void parse_arc ( ifstream &  input_stream,
EepicNode root 
)

◆ parse_connexion()

void parse_connexion ( ifstream &  input_stream,
EepicNode root 
)

◆ parse_dashed_arc()

void parse_dashed_arc ( ifstream &  input_stream,
EepicNode root 
)

◆ parse_deway_number()

◆ parse_ellipse()

void parse_ellipse ( ifstream &  input_stream,
EepicNode root 
)

Definition at line 791 of file ntreepic.C.

References ISELLIPSE, ISRECTANGLE, Aleph::maps(), parse_deway_number(), and root().

Referenced by read_input_and_build_tree().

◆ parse_first_root_definition()

EepicNode * parse_first_root_definition ( ifstream &  input_stream)

◆ parse_hradio()

void parse_hradio ( ifstream &  input_stream,
EepicNode root 
)

Definition at line 620 of file ntreepic.C.

References Aleph::load_number(), Aleph::maps(), parse_deway_number(), root(), XD, and XR.

Referenced by read_input_and_build_tree().

◆ parse_key_node_and_allocate()

EepicNode * parse_key_node_and_allocate ( ifstream &  input_stream)

◆ parse_node_definition()

void parse_node_definition ( ifstream &  input_stream,
EepicNode root 
)

◆ parse_rectangle()

void parse_rectangle ( ifstream &  input_stream,
EepicNode root 
)

Definition at line 800 of file ntreepic.C.

References ISELLIPSE, ISRECTANGLE, Aleph::maps(), parse_deway_number(), and root().

Referenced by read_input_and_build_tree().

◆ parse_root_definition()

void parse_root_definition ( ifstream &  input_stream,
EepicNode root 
)

Definition at line 595 of file ntreepic.C.

References Aleph::maps(), parse_key_node_and_allocate(), and root().

Referenced by read_input_and_build_tree().

◆ parse_shadow()

void parse_shadow ( ifstream &  input_stream,
EepicNode root 
)

Definition at line 701 of file ntreepic.C.

References Aleph::maps(), parse_deway_number(), root(), and SHADOW.

Referenced by read_input_and_build_tree().

◆ parse_tag()

void parse_tag ( ifstream &  input_stream,
EepicNode root 
)

◆ parse_vradio()

void parse_vradio ( ifstream &  input_stream,
EepicNode root 
)

Definition at line 635 of file ntreepic.C.

References Aleph::load_number(), Aleph::maps(), parse_deway_number(), root(), YD, and YR.

Referenced by read_input_and_build_tree().

◆ parse_without_arc()

void parse_without_arc ( ifstream &  input_stream,
EepicNode root 
)

◆ parse_without_node()

void parse_without_node ( ifstream &  input_stream,
EepicNode root 
)

Definition at line 650 of file ntreepic.C.

References Aleph::maps(), parse_deway_number(), root(), and WITHOUTNODE.

Referenced by read_input_and_build_tree().

◆ parse_xoffset()

void parse_xoffset ( ifstream &  input_stream,
EepicNode root 
)

Definition at line 680 of file ntreepic.C.

References Aleph::load_number(), Aleph::maps(), parse_deway_number(), root(), and XOFFSET.

Referenced by read_input_and_build_tree().

◆ parse_yoffset()

void parse_yoffset ( ifstream &  input_stream,
EepicNode root 
)

Definition at line 691 of file ntreepic.C.

References Aleph::load_number(), Aleph::maps(), parse_deway_number(), root(), and YOFFSET.

Referenced by read_input_and_build_tree().

◆ parser_opt()

◆ precompute_x_coordinates_for_tree()

void precompute_x_coordinates_for_tree ( EepicNode root)
inline

◆ precompute_x_for_node()

void precompute_x_for_node ( EepicNode p,
const int  level,
const int  child 
)

◆ print_parameters()

void print_parameters ( )
inline

Definition at line 1986 of file ntreepic.C.

References hd, hr, Aleph::maps(), resolution, tree_gap, vd, vr, x_offset, x_picture_offset, xgap, y_offset, y_picture_offset, and ygap.

Referenced by parser_opt().

◆ read_input_and_build_tree()

◆ read_parameters()

void read_parameters ( )
inline

Definition at line 1976 of file ntreepic.C.

References hd, hr, Aleph::maps(), parameters_file_name, resolution, tree_gap, vd, vr, x_offset, x_picture_offset, xgap, y_offset, y_picture_offset, and ygap.

Referenced by main().

◆ save_parameters()

void save_parameters ( )
inline

Definition at line 1964 of file ntreepic.C.

References BLANK, hd, hr, output, parameters_file_name, resolution, tree_gap, vd, vr, x_offset, x_picture_offset, xgap, y_offset, y_picture_offset, and ygap.

Referenced by main(), and parser_opt().

◆ shift_tree_to_right()

void shift_tree_to_right ( EepicNode p,
int  ,
int   
)

Definition at line 1212 of file ntreepic.C.

References shift_size, and X.

Referenced by compute_coordinates_for_forest_and_set_picture_size().

Variable Documentation

◆ arg_defs

struct argp arg_defs = {options, parser_opt, arg_doc, doc, 0, 0, 0}
static

Definition at line 2152 of file ntreepic.C.

Referenced by main().

◆ arg_doc

char arg_doc[] = "-f input-file [-o output-file]\n"
static

Definition at line 1834 of file ntreepic.C.

◆ argp_program_bug_address

const char* argp_program_bug_address = "lrleon@ula.ve"

Definition at line 1828 of file ntreepic.C.

◆ argp_program_version

const char* argp_program_version
Initial value:
=
"ntreepic 1.7 - ALEPH drawer for general rooted trees\n"
"Copyright (C) 2004, 2007 UNIVERSITY of LOS ANDES (ULA)\n"
"Merida - REPUBLICA BOLIVARIANA DE VENEZUELA\n"
"Center of Studies in Microelectronics & Distributed Systems (CEMISID)\n"
"ULA Computer Science Department\n"
"This is free software; There is NO warranty; not even for MERCHANTABILITY\n"
"or FITNESS FOR A PARTICULAR PURPOSE\n"
"\n"

Definition at line 1817 of file ntreepic.C.

Referenced by parser_opt().

◆ command_line

std::string command_line

Definition at line 203 of file ntreepic.C.

Referenced by generate_prologue(), and main().

◆ doc

char doc[] = "ntreepic -- Aleph drawer for general rooted trees"
static

◆ draw_list_representation

bool draw_list_representation = false

Definition at line 211 of file ntreepic.C.

Referenced by generate_tree(), and parser_opt().

◆ ellipses

bool ellipses = true

Definition at line 209 of file ntreepic.C.

Referenced by parser_opt().

◆ generate_binary_tree

bool generate_binary_tree = false

Definition at line 212 of file ntreepic.C.

Referenced by main(), and parser_opt().

◆ h_size

long double h_size = 0

◆ hd

long double hd = 2 * hr

Definition at line 191 of file ntreepic.C.

Referenced by parser_opt(), print_parameters(), read_parameters(), and save_parameters().

◆ hello

const char* hello
static
Initial value:
=
"ALEPH drawer for general rooted trees\n"
"Copyright (C) 2004, 2007 University of Los Andes (ULA)\n"
"Merida - REPUBLICA BOLIVARIANA DE VENEZUELA\n"
"Center of Studies in Microelectronics & Distributed Systems (CEMISID)\n"
"ULA Computer Science Department\n"
"This is free software; There is NO warranty; not even for MERCHANTABILITY\n"
"or FITNESS FOR A PARTICULAR PURPOSE\n"
"\n"

Definition at line 1837 of file ntreepic.C.

Referenced by main().

◆ hr

long double hr = 70

◆ input_file_name

std::string input_file_name

Definition at line 204 of file ntreepic.C.

Referenced by generate_prologue(), main(), and parser_opt().

◆ latex_header

bool latex_header = false

Definition at line 208 of file ntreepic.C.

Referenced by generate_epilogue(), generate_prologue(), and parser_opt().

◆ license_text

const char license_text[]
static

Definition at line 1848 of file ntreepic.C.

Referenced by parser_opt().

◆ not_nodes

bool not_nodes = false

Definition at line 213 of file ntreepic.C.

Referenced by generate_tree(), and parser_opt().

◆ options

struct argp_option options[]
static

Definition at line 1885 of file ntreepic.C.

Referenced by Aleph::export_network_to_dot(), Aleph::network_to_dot_string(), and TEST_F().

◆ output_file_name

std::string output_file_name

Definition at line 205 of file ntreepic.C.

Referenced by generate_prologue(), main(), and parser_opt().

◆ parameters_file_name

const char* parameters_file_name = "./.ntreepic"

Definition at line 1960 of file ntreepic.C.

Referenced by read_parameters(), and save_parameters().

◆ rectangles

bool rectangles = false

Definition at line 210 of file ntreepic.C.

Referenced by parser_opt().

◆ shift_size

long double shift_size = 0

◆ tree_gap

◆ tree_number

int tree_number = 0

Definition at line 1372 of file ntreepic.C.

Referenced by Aleph::generate_tree(), and generate_tree().

◆ v_size

double v_size = 0

◆ vd

long double vd = 2 * vr

Definition at line 192 of file ntreepic.C.

Referenced by parser_opt(), print_parameters(), read_parameters(), and save_parameters().

◆ vr

long double vr = 70

◆ x_max

◆ x_offset

long double x_offset = 0

Definition at line 198 of file ntreepic.C.

Referenced by parser_opt(), print_parameters(), read_parameters(), and save_parameters().

◆ x_picture_offset

long double x_picture_offset = 0

◆ xgap

long double xgap = 70

◆ y_max

long double y_max = 0

◆ y_offset

long double y_offset = font_height() / 2.0

◆ y_picture_offset

long double y_picture_offset = 0

◆ ygap