28 #ifndef _CHAINCON_AWDIAGSIM_H_ 29 #define _CHAINCON_AWDIAGSIM_H_ 37 #include "chomp/system/config.h" 50 template <
class VertexT,
class EmptyT>
56 VertexT *left =
new VertexT [dim + 1];
57 VertexT *right =
new VertexT [dim + 1];
58 for (
int n = 0; n <= dim; ++ n)
60 for (
int i = 0; i <= n; ++ i)
62 for (
int i = n; i <= dim; ++ i)
63 right [i - n] = s [i];
64 t. add (SimplexType (n, left),
65 SimplexType (dim - n, right));
93 template <
class VertexT,
class EmptyT,
class CoefT>
100 VertexT *left =
new VertexT [dim + 1];
101 VertexT *right =
new VertexT [dim + 1];
102 for (
int n = 0; n <= dim; ++ n)
104 for (
int i = 0; i <= n; ++ i)
106 for (
int i = n; i <= dim; ++ i)
107 right [i - n] = s [i];
111 t. add (SimplexType (n, left),
112 SimplexType (dim - n, right), coef);
120 #endif // _CHAINCON_AWDIAGSIM_H_ A simplex with vertices of arbitrary type.
A tensor of chains with coefficients in an arbitrary commutative ring.
Combinatorial tensor of cells.
A combinatorial tensor (for coefficients in Z_2).
A simplex class with arbitrary vertices.
void AWdiagonal(const tSimplex< VertexT, EmptyT > &s, tCombTensor< tSimplex< VertexT, EmptyT >, tSimplex< VertexT, EmptyT > > &t)
Computes the Alexander-Whitney diagonal of a simplex.
int AW_kappa(int n, int dim)
Computes the sign in the A-W formula for a simplex (see the paper for details).