Vertex distance degree
Descriptor Category : topological
c++ entity: function
Description
The vertex distance degree is the row sum of the
distance matrix: SUM[j=1,A](di,j).
Where A is the number of vertices.
Prototype
template <class UblasMatrix>
size_t
vertex_distance_degree(const UblasMatrix& dist_matrix, size_t vrtx);
Where defined
morpho/cdl/descriptors/topological.hpp
Namespace
morpho::cdl
Inherits from
Function, no inheritance.
Arguments
| Argument | Model of |
| dist_matrix |
supports operator(i,j) to access the elements of the matrix |
| vertex |
size_t |
Example
// suppose you're streaming a mol format from the stdin:
typedef desc_molecular_properties<> desc_mol_props_t;
typedef boost::property<mol_propsS, molecular_properties<>,
boost::property<descriptors_mol_propsS, desc_mol_props_t> > descr_props_t;
typedef molecule<double,descr_props_t> M;
morpho::cdl::nail_juice<M> j;
morpho::cdl::get_juice_from_stream(std::cin, j, 0, sdf_formatT());
M mol(j);
std::cout << "vertex distance degree of first atom ";
std::cout << vertex_distance_degree(MolProperty<distance_matrixS,M>::get(mol), *mol.vertices().first) << '\n';
Related Items
References
- Todeschini, R.; Consonni, V. "Handbook of Molecular Descriptors". Wiley-VCH,
Methods and Principles in Medicinal Chemistry. Volume 11. 2000.
Copyright (c) Vladimir Josef Sykora and Morphochem AG 2003