Crossings Minimization  1.0
ord.h File Reference

header for utility functions that read and write .ord files (node ordering on layers of a graph) More...

#include <stdio.h>
#include <stdbool.h>
#include "defs.h"
Include dependency graph for ord.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool getGraphName (FILE *in, char *buffer)
 
bool nextLayer (FILE *in, int *layer)
 
bool nextNode (FILE *in, char *node_buffer)
 
void ordPreamble (FILE *out, const char *graph_name, const char *generation_method)
 
void beginLayer (FILE *out, int layer, const char *type)
 
void endLayer (FILE *out)
 
void outputNode (FILE *out, const char *node)
 

Detailed Description

header for utility functions that read and write .ord files (node ordering on layers of a graph)

Author
Matt Stallmann
Date
29 Dec 1998
Id
ord.h 2 2011-06-07 19:50:41Z mfms

Definition in file ord.h.

Function Documentation

◆ beginLayer()

void beginLayer ( FILE *  out,
int  layer,
const char *  type 
)

Writes text needed for the beginning of a layer

Parameters
outoutput stream
layerlayer number
typeadditional information, e.g., whether the ordering was randomized, natural (based on dot file), or on a heuristic

Definition at line 187 of file ord.c.

References current_column, number_of_nodes, and output_layer.

Referenced by writeOrd().

◆ endLayer()

void endLayer ( FILE *  out)

Definition at line 196 of file ord.c.

References number_of_nodes, and output_layer.

Referenced by writeOrd().

◆ getGraphName()

bool getGraphName ( FILE *  in,
char *  buffer 
)

Definition at line 97 of file ord.c.

References eatSpaceAndComments(), name_buffer, and valid_name.

Here is the call graph for this function:

◆ nextLayer()

bool nextLayer ( FILE *  in,
int *  layer 
)

Definition at line 112 of file ord.c.

References CLOSE_LIST, eatSpaceAndComments(), hold_layer, INSIDE_LAYER, LAYER_NUMBER, OPEN_LIST, OUTSIDE_LAYER, and state.

Referenced by allocateLayers(), and assignNodesToLayers().

Here is the call graph for this function:

◆ nextNode()

bool nextNode ( FILE *  in,
char *  node_buffer 
)

Definition at line 146 of file ord.c.

References CLOSE_LIST, COMMENT_CHAR, eatSpaceAndComments(), hold_layer, INSIDE_LAYER, and state.

Referenced by allocateLayers(), and assignNodesToLayers().

Here is the call graph for this function:

◆ ordPreamble()

void ordPreamble ( FILE *  out,
const char *  graph_name,
const char *  generation_method 
)

Definition at line 180 of file ord.c.

Referenced by writeOrd().

◆ outputNode()

void outputNode ( FILE *  out,
const char *  node 
)

Definition at line 204 of file ord.c.

References current_column, LINE_LENGTH, number_of_nodes, and output_layer.

Referenced by writeNodes().