2 * This file is part of TISEAN
4 * Copyright (c) 1998-2007 Rainer Hegger, Holger Kantz, Thomas Schreiber
6 * TISEAN is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * TISEAN is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with TISEAN; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 /*Author: Rainer Hegger Last modified: Jul 9, 1999 */
23 unsigned long find_multi_neighbors(double **s,long **box,long *list,double **x,
24 unsigned long l,unsigned int bs,unsigned int dim,
25 unsigned int emb,unsigned int del,double eps,
29 int i,i1,i2,j,j1,k,k1,li;
34 i=(int)(x[0][0]/eps)&ib;
35 j=(int)(x[dim-1][0]/eps)&ib;
37 for (i1=i-1;i1<=i+1;i1++) {
39 for (j1=j-1;j1<=j+1;j1++) {
40 element=box[i2][j1&ib];
41 while (element != -1) {
44 for (li=0;li<dim;li++) {
45 dx=fabs(x[li][k1]-s[li][element+k1]);
54 element=list[element];