Commit 7a13f998 authored by incardon's avatar incardon

Fixing the documentation

parent bd38e0dd
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.8.6 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="yes" title="" intro=""/>
<tab type="namespaces" visible="yes" title="">
<tab type="namespacelist" visible="yes" title="" intro=""/>
<tab type="namespacemembers" visible="yes" title="" intro=""/>
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classlist" visible="yes" title="" intro=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title="" intro=""/>
<tab type="classmembers" visible="yes" title="" intro=""/>
</tab>
<tab type="files" visible="yes" title="">
<tab type="filelist" visible="yes" title="" intro=""/>
<tab type="globals" visible="yes" title="" intro=""/>
</tab>
<tab type="examples" visible="yes" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class>
<briefdescription visible="yes"/>
<detaileddescription title=""/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<inheritancegraph visible="$CLASS_GRAPH"/>
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
<memberdecl>
<nestedclasses visible="yes" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="yes"/>
</memberdecl>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="yes"/>
<usedfiles visible="$SHOW_USED_FILES"/>
<authorsection visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace>
<briefdescription visible="yes"/>
<memberdecl>
<nestednamespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<classes visible="yes" title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="yes"/>
</namespace>
<!-- Layout definition for a file page -->
<file>
<briefdescription visible="yes"/>
<includes visible="$SHOW_INCLUDE_FILES"/>
<includegraph visible="$INCLUDE_GRAPH"/>
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
<sourcelink visible="yes"/>
<memberdecl>
<classes visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<constantgroups visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group>
<briefdescription visible="yes"/>
<groupgraph visible="$GROUP_GRAPHS"/>
<memberdecl>
<nestedgroups visible="yes" title=""/>
<dirs visible="yes" title=""/>
<files visible="yes" title=""/>
<namespaces visible="yes" title=""/>
<classes visible="yes" title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory>
<briefdescription visible="yes"/>
<directorygraph visible="yes"/>
<memberdecl>
<dirs visible="yes"/>
<files visible="yes"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -19,8 +19,10 @@ BOOST_AUTO_TEST_CASE( graph_use)
{
std::cout << "Graph unit test start" << "\n";
//! [Define vertex and edge of the graph]
typedef Point_test<float> V;
typedef Point_test<float> E;
//! [Define vertex and edge of the graph]
// Point
Point_test<float> p;
......@@ -43,14 +45,12 @@ BOOST_AUTO_TEST_CASE( graph_use)
p.get<V::t>()[2][1] = 3.0;
p.get<V::t>()[2][2] = 11.0;
//! define a test graph where the vertex and edge store several scalar vectorial and tensorial quantities
//! [Create a Cartesian graph]
//! define a test graph where the vertex and edge store several scalar vectorial and tensorial quantities
Graph_CSR<V,E> g;
//! Create a point
//! try to construct a 2D dimensional cartesian graph
//! construct a 2D dimensional Cartesian graph
// first create the vertex
......@@ -91,6 +91,8 @@ BOOST_AUTO_TEST_CASE( graph_use)
}
}
//! [Create a Cartesian graph]
// Test if duplicate work
Graph_CSR<V,E> g_dup = g.duplicate();
......@@ -120,6 +122,7 @@ BOOST_AUTO_TEST_CASE( graph_use)
// Test the no edge case
//! [Create a tree graph with no edge properties]
Graph_CSR<V> g_no_edge;
// Create a tree
......@@ -164,6 +167,8 @@ BOOST_AUTO_TEST_CASE( graph_use)
g_no_edge.addVertex(p);
g_no_edge.addEdge(6,14);
//! [Create a tree graph with no edge properties]
// Check that each vertex has 2 child
for (size_t i = 0 ; i < g_no_edge.getNVertex() ; i++)
......
......@@ -51,8 +51,6 @@
#define NO_EDGE -1
/*! \brief class with no edge
*
*
*
*/
class no_edge
......@@ -244,16 +242,13 @@ public:
};
/*! \brief Graph that store a CSR graph format
*
* Graph that store a CSR graph format
/*! \brief Structure that store a graph in CSR format or basically in compressed adjacency matrix format
*
* \param V each vertex will encapsulate have this type
* \param E each edge will encapsulate this type
* \param device Type of device / basicaly it select the layout
* for device_cpu is (x_1, p1_1, p2_1, p3_1 ....), ... ( x_n, p1_1, p2_1, p3_1, ...)
* for device_gpu is (x_1, ... , x_n) ... (p1_n, ... pn_n)
*
* where x_1 is the index where it end the list of the neighborhood list and pj_k is
* the property j for the vertex j. Basically in the first case one array will store
* index and property of each vertex, in the second case several array will store
......@@ -262,9 +257,16 @@ public:
* \param VertexList structure that store the list of Vertex
* \param EdgeList structure that store the list of edge
*
* WARNING: This graph is suitable only when we know the graph structure and we build
* \warning This graph is suitable only when we know the graph structure and we build
* the graph adding vertexes and edges, removing vertex and edge is EXTREMLY expensive
*
* ### Define vertex and edge of the graph
* \snippet graph_unit_tests.hpp Define vertex and edge of the graph
* ### Create a Cartesian graph
* \snippet graph_unit_tests.hpp Create a Cartesian graph
* ### Create a tree graph with no edge properties
* \snippet graph_unit_tests.hpp Create a tree graph with no edge properties
*
*/
template<typename V, typename E=no_edge,template<typename> class device=openfpm::device_cpu,template<typename, typename,typename, typename, unsigned int> class VertexList=openfpm::vector, template<typename,typename,typename,typename, unsigned int> class EdgeList=openfpm::vector, typename Memory=HeapMemory, typename grow_p=openfpm::grow_policy_double>
......@@ -476,8 +478,7 @@ public:
*
* operator to access the vertex
*
*
* \param i property to access
* \tparam i property to access
* \param id of the vertex to access
*
*/
......@@ -486,10 +487,9 @@ public:
return v.template get<i>(id);
}
/*! \brief Function to access the vertexes
*
/*! \brief Access the vertex
*
* \param i property to access
* \tparam i property to access
* \param id of the vertex to access
*
*/
......@@ -532,12 +532,9 @@ public:
return v.template get(id.get());
}
/*! \brief operator to access the edge
*
* operator to access the edge
*
/*! \brief Access the edge
*
* \param i property to access
* \tparam i property to access
* \param id of the edge to access
*
*/
......@@ -547,12 +544,9 @@ public:
}
/*! \brief operator to access the edge
*
* operator to access the edge
/*! \brief Access the edge
*
*
* \param i property to access
* \tparam i property to access
* \param id of the edge to access
*
*/
......@@ -561,9 +555,7 @@ public:
return e.template get<i>(id);
}
/*! \brief operator to access the edge
*
* operator to access the edge
/*! \brief Access the edge
*
* \param id of the edge to access
*
......@@ -612,12 +604,11 @@ public:
/*! \brief Return the number of childs of a vertex
*
* \param c Child id
* \param c child id
*
* \return the number of childs
*
*/
inline size_t getNChilds(typename VertexList<V,dev_V_sel,Memory,grow_p,openfpm::vect_isel<V>::value>::iterator_key & c)
{
// Get the number of childs
......@@ -625,13 +616,12 @@ public:
return v_l.template get<0>(c.get());
}
/*! \brief Get the child edge
/*! \brief Get the vertex edge
*
* \param c Child
* \param e edge id within the child
* \param v vertex
* \param v_e edge id
*
*/
inline auto getChildEdge(size_t v, size_t v_e) -> decltype(e.get(0))
{
#ifdef DEBUG
......
......@@ -4,22 +4,16 @@
#include "Grid/comb.hpp"
#include "Grid/grid_key_expression.hpp"
/*! \brief In this header file the main grid accessor are defined
*
* Given a grid a in general a set of indexes define one element in the grid
* In this header file several classes that encapsulate this information are
* defined
*
*/
/*! \brief grid_key_dx is the key to access any element in the grid
*
* grid_key_dx is the key to access any element in the grid
* Given a grid in general a set of indexes define one element in the grid
* For example 2 indexes identify one element on a two dimensional grid,
* 3 indexes on a 3 dimensional grid ...
*
* \param dim dimensionality of the grid
* \tparam dim dimensionality of the grid
*
*/
template<unsigned int dim>
class grid_key_dx
{
......@@ -97,7 +91,6 @@ public:
inline grid_key_dx_sum<dim,grid_key_dx<dim>,comb<dim>> operator+(comb<dim> & cmb) const
{
grid_key_dx_sum<dim,grid_key_dx<dim>,comb<dim>> exp_sum(*this,cmb);
// grid_key_dx_expression<dim,grid_key_dx_sum<dim,grid_key_dx<dim>,comb<dim>>> exp(exp_sum);
return exp_sum;
}
......
......@@ -62,14 +62,9 @@ public:
};
//#pragma openfpm create(layout)
/*! \brief class that store the information at runtime of the grid and define the index linearization
/*! \brief class that store the information of the grid like number of point on each direction and define the index linearization
* by stride
*
* class that store the information at runtime of the grid plus define the linearization
*
* \param N dimensionality
* \param T type of object is going to store the grid
*
......@@ -215,7 +210,7 @@ public:
/*! \brief Reset the dimension of the grid
*
* \param std::vector that store on each dimension the size of the grid
* \param dims std::vector that store on each dimension the size of the grid
*
*/
......@@ -227,10 +222,9 @@ public:
/*! \brief Reset the dimension of the grid
*
* \param std::vector that store on each dimension the size of the grid
* \param dims store on each dimension the size of the grid
*
*/
void setDimensions(const size_t (& dims)[N])
{
Initialize(dims);
......@@ -453,13 +447,11 @@ public:
}
}
/*! \brief Linearization of the grid_key_dx
*
* Linearization of a shifted grid_key_dx
/*! \brief Linearization of the grid_key_dx with a specified shift
*
* \tparam class that check the linearization, if this check the function return -1
* \param grid_key_dx to linearize
* \param shift of the grid key
* \tparam check class that check the linearization, if this check fail the function return -1
* \param gk grid_key_dx to linearize
* \param sum_id shift on each dimension
*
* \return The linearization of the gk key shifted by c, or -1 if the check fail
*/
......@@ -510,7 +502,7 @@ public:
* Linearization of the grid_key_dx given a key, it spit out a number that is just the 1D linearization
* of the key. In this case is the linearization of N index
*
* \param grid_key_dx<dim> grid key to access the element on a key
* \param k grid key to access the element on the grid
*
*/
......@@ -530,7 +522,7 @@ public:
* Linearization of the grid_key_dx given a key, it spit out a number that is just the 1D linearization
* of the key. In this case is the linearization of N index
*
* \param grid_key_dx<dim> grid key to access the element on a key
* \param gk grid key to access the element of the grid
*
*/
......@@ -572,12 +564,10 @@ public:
/*! \brief inversion of the linearization of the grid_key_dx
*
* \param mem_id id of the object
* \param grid_key, key of the grid that id identify
* \param id of the object
* \return key of the grid that id identify
*
*/
//#pragma openfpm layout(get)
grid_key_dx<N> InvLinId(mem_id id) const
{
// Inversion of linearize
......@@ -598,7 +588,8 @@ public:
* Linearization of the grid_key_d given a key, it spit out a number that is just the 1D linearization
* of the key. In this case is the linearization of N index
*
* \param grid_key_d<dim,p> grid key to access the element on a key
* \param gk grid key to access the element on a key
* \return index of the memory
*
*/
......@@ -779,7 +770,7 @@ public:
/*! \brief Default constructor
*
* \WARNING entremly unsafe
* \warning entremly unsafe
* Before use the iterator you have call reinitialize
*
*/
......@@ -790,13 +781,9 @@ public:
#endif
}
/*! \brief Constructor require a grid
/*! \brief Constructor from a grid_key_dx_iterator<dim>
*
* Constructor require a grid<dim,T>
*
* \param T type of object that the grid store
*
* \param g Grid on which iterate
* \param g_it grid_key_dx_iterator<dim>
*/
grid_key_dx_iterator(const grid_key_dx_iterator<dim> & g_it)
: grid_base(g_it.grid_base)
......@@ -813,13 +800,9 @@ public:
#endif
}
/*! \brief Constructor require a grid
*
* Constructor require a grid<dim,T>
/*! \brief Constructor require a grid_sm<dim,T>
*
* \param T type of object that the grid store
*
* \param g Grid on which iterate
* \param g info of the grid on which iterate
*/
template<typename T> grid_key_dx_iterator(const grid_sm<dim,T> & g)
: grid_base(g)
......@@ -834,13 +817,9 @@ public:
#endif
}
/*! \brief Constructor require a grid
*
* Constructor require a grid<dim,T>
/*! \brief Constructor from another grid_key_dx_iterator
*
* \param T type of object that the grid store
*
* \param g Grid on which iterate
* \param key_it grid_key_dx_iterator
*/
grid_key_dx_iterator<dim> operator=(const grid_key_dx_iterator<dim> & key_it)
{
......@@ -855,8 +834,6 @@ public:
}
/*! \brief Get the next element
*
* Get the next element
*
* \return the next grid_key
*
......@@ -896,7 +873,7 @@ public:
*
* Set the dimension
*
* \param dim is the dimension
* \param d is the dimension
* \param sz set the counter to sz
*
*/
......@@ -986,16 +963,14 @@ class grid_key_dx_iterator_sp : public grid_key_dx_iterator<dim>
public:
/*! \brief Constructor require a grid
*
* Constructor require a grid<dim,T>
/*! \brief Constructor require a grid grid<dim,T>
*
* It construct an iterator from one index to another, in particular
* if linearize is the function that linearize all the grid_key, it
* create an iterator that pass through Linearize^(-1)(start)
* Linearize^(-1)(start+1) ....... Linearize^(-1)(stop)
*
* \param T type of object that the grid store
* \tparam T type of object that the grid store
*
* \param g Grid on which iterate
* \param from starting point
......@@ -1120,26 +1095,20 @@ public:
/*! \brief Default constructor
*
* WARNING: extremly unsafe
* \warning extremely unsafe
* If you use this constructor before use the iterator you should call reinitialize first
*
*/
grid_key_dx_iterator_sub()
{}
/*! \brief Constructor require a grid
*
* Constructor require a grid<dim,T>
/*! \brief Constructor from another grid_key_dx_iterator_sub
*
* It construct an iterator over an hyper-cube defined by start and stop,
* \WARNING if start and stop are outside the domain defined by g the intersection
* \warning if start and stop are outside the domain defined by g the intersection
* will be considered
*
* \param T type of object that the grid store
*
* \param g Grid on which iterate
* \param start starting point
* \param stop end point
* \param g_s_it grid_key_dx_iterator_sub
*
*/
grid_key_dx_iterator_sub(const grid_key_dx_iterator_sub<dim> & g_s_it)
......@@ -1147,15 +1116,13 @@ public:
{}
/*! \brief Constructor require a grid
*
* Constructor require a grid<dim,T>
/*! \brief Constructor require a grid grid<dim,T>
*
* It construct an iterator over an hyper-cube defined by start and stop,
* \WARNING if start and stop are outside the domain defined by g the intersection
* \warning if start and stop are outside the domain defined by g the intersection
* will be considered
*
* \param T type of object that the grid store
* \tparam T type of object that the grid store
*
* \param g Grid on which iterate
* \param start starting point
......@@ -1182,17 +1149,15 @@ public:
}
/*! \brief Constructor require a grid
*
* Constructor require a grid<dim,T>
/*! \brief Constructor require a grid grid<dim,T>
*
* It construct an iterator over an hyper-cube defined by start and stop,
* \WARNING if start and stop are outside the domain defined by g the intersection
* \warning if start and stop are outside the domain defined by g the intersection
* will be considered
*
* \param T type of object that the grid store
* \tparam T type of object that the grid store
*
* \param g grid info we are iterating
* \param g info of the grid where we are iterating
* \param m Margin of the domain
*
*/
......@@ -1210,13 +1175,11 @@ public:
Initialize();
}
/*! \brief Constructor require a grid
*
* Constructor require a grid<dim,T>
/*! \brief Constructor require a grid grid<dim,T>
*
* It construct an iterator over an hyper-cube defined by start and stop,
*
* \param T type of object that the grid store
* \tparam T type of object that the grid store
*
* \param g Grid on which iterate
* \param start starting point
......@@ -1326,9 +1289,10 @@ public:
/*! \brief Reinitialize the iterator
*
* it reinitialize the iterator with the passed grid_key_dx_iterator_sub, it became like a clone
* it re-initialize the iterator with the passed grid_key_dx_iterator_sub
* the actual position of the grid_key_dx_iterator_sub is ignored
*
* \param grid_key_dx_iterator_sub
* \param g_s_it grid_key_dx_iterator_sub
*
*/
......@@ -1385,11 +1349,9 @@ public:
return dim;
}
/*! \brief constructor
*
* constructor
/*! \brief constructor from another key
*
* \param dim Dimensionality
* \param key
*
*/
grid_key_dx_r(grid_key_dx_r & key)
......
......@@ -72,6 +72,7 @@ template<typename g> void test_layout_grid3d(g & c3, size_t sz)
std::cout << "3D Array with grid_key (without redundant dimension): " << "\n";
#endif
//! [Access a grid c3 of size sz on each direction]
typedef Point_test<float> P;
timer t;
......@@ -111,6 +112,8 @@ template<typename g> void test_layout_grid3d(g & c3, size_t sz)
}
}
//! [Access a grid c3 of size sz on each direction]
#ifdef VERBOSE_TEST
t.stop();
......@@ -306,6 +309,7 @@ template<unsigned int dim, typename g> void test_layout_gridNd(g & c3, size_t sz
t.start();
#endif
//! [Access to an N-dimensional grid with an iterator]
typedef Point_test<float> P;
grid_key_dx_iterator<dim> key_it = c3.getIterator();
......@@ -336,7 +340,7 @@ template<unsigned int dim, typename g> void test_layout_gridNd(g & c3, size_t sz
++key_it;
}
//! [Access to an N-dimensional grid with an iterator]
#ifdef VERBOSE_TEST
t.stop();
......@@ -549,9 +553,13 @@ BOOST_AUTO_TEST_CASE( grid_use)
#ifdef CUDA_GPU
{grid_gpu<3, Point_test<float> > c3(sz);
{
//! [Definition and allocation of a 3D grid on GPU memory]
grid_gpu<3, Point_test<float> > c3(sz);
c3.setMemory<CudaMemory>();
test_layout_grid3d(c3,i);}
//! [Definition and allocation of a 3D grid on GPU memory]
test_layout_grid3d(c3,i);
}