diff --git a/tensor.cc b/tensor.cc index 0328ac6..f86f5b7 100644 --- a/tensor.cc +++ b/tensor.cc @@ -2485,6 +2485,13 @@ for(int i=0; i; template class Tensor >; diff --git a/tensor.h b/tensor.h index 0a1f13e..4680e5b 100644 --- a/tensor.h +++ b/tensor.h @@ -231,11 +231,14 @@ int flatposition(int group, int index, const NRVec &shape); int flatposition(const INDEX &i, const NRVec &shape); //position of that index in FLATINDEX INDEX indexposition(int flatindex, const NRVec &shape); //inverse to flatposition + //useful for negative offsets and 0 index excluded bool zero_in_index(const FLATINDEX &); bool zero_in_index(const SUPERINDEX &); bool zero_in_index(const INDEXMATRIX &, const LA_largeindex row); +bool shares_index(const FLATINDEX &I, const FLATINDEX &J); + FLATINDEX superindex2flat(const SUPERINDEX &I); template