/Users/bernard/b20/bsoft/src/model/model_path.cpp(3)

NAME
/Users/bernard/b20/bsoft/src/model/model_path.cpp - Library routines used for model processing.

SYNOPSIS

#include 'model_util.h'
#include 'model_transform.h'
#include 'model_select.h'
#include 'model_compare.h'
#include 'mol_transform.h'
#include 'mol_compare.h'
#include 'mol_util.h'
#include 'symmetry.h'
#include 'Matrix3.h'
#include 'random_numbers.h'
#include 'linked_list.h'
#include 'utilities.h'

  Functions
Matrix model_shortest_path (Bmodel *model)
Calculates the shortest path between every pair of vertices.
double model_wiener_index (Bmodel *model)
Calculates the Wiener index.
int comp_link_check (Bcomponent *comp, Bcomponent *comp2)
int comp_link_check (Bmodel *model, Bstring &id1, Bstring &id2)
Blink * model_link_add (Bmodel *model, Bstring &id1, Bstring &id2)
int model_check_path (Bmodel *model, Bcomponent **path)
double model_add_path (Bmodel *model, Bcomponent **path)
int comp_pick_next (int i, int n, Bcomponent *comp, Bcomponent **path, Bmodel *model)
Bmodel * model_hamiltonian_cycle (Bmodel *model)
Calculates the Hamiltonian cycles in a model.

  Variables
int verbose

Detailed Description

Library routines used for model processing.

Author:
    Bernard Heymann

Date:
    Created: 20060908

    Modified: 20150208

Definition in file model_path.cpp.

Function Documentation

  int comp_link_check (Bcomponent * comp, Bcomponent * comp2)

Definition at line 113 of file model_path.cpp.

  int comp_link_check (Bmodel * model, Bstring & id1, Bstring & id2)

Definition at line 123 of file model_path.cpp.

  int comp_pick_next (int i, int n, Bcomponent * comp, Bcomponent ** path, Bmodel * model)

Definition at line 191 of file model_path.cpp.

  double model_add_path (Bmodel * model, Bcomponent ** path)

Definition at line 164 of file model_path.cpp.

  int model_check_path (Bmodel * model, Bcomponent ** path)

Definition at line 145 of file model_path.cpp.

  Bmodel* model_hamiltonian_cycle (Bmodel * model)

Calculates the Hamiltonian cycles in a model.

Parameters:
    *model model structure.

Returns:
    Bmodel* linked list of models with cycle links.

    A Hamiltonian cycle passes through each component once.
    The cycles are limited to the links in the input model.
    Redundant cycles are discarded.
    Only the first model in the linked list is used.
    Each of the resultant models has links forming a Hamiltonian cycle.

     Reference: H. Wiener, J. Am. Chem. Soc., 1947, 69, 17.

Definition at line 239 of file model_path.cpp.

  Blink* model_link_add (Bmodel * model, Bstring & id1, Bstring & id2)

Definition at line 134 of file model_path.cpp.

  Matrix model_shortest_path (Bmodel * model)

Calculates the shortest path between every pair of vertices.

Parameters:
    *model model structure.

Returns:
    Matrix path matrix.

    The adjacency matrix is calculated as a starting point.
    Only the first model in the linked list is used.

Definition at line 36 of file model_path.cpp.

  double model_wiener_index (Bmodel * model)

Calculates the Wiener index.

Parameters:
    *model model structure.

Returns:
    double average Wiener index.

    The Wiener index is calculated as the sum of the elements of
    the shortest path matrix.
    Only the first model in the linked list is used.

     Reference: H. Wiener, J. Am. Chem. Soc., 1947, 69, 17.

Definition at line 82 of file model_path.cpp.

Variable Documentation

  int verbose

Author

Generated automatically by Doxygen for Bsoft from the source code.