File: ce_types.h

package info (click to toggle)
pymol 2.5.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 42,288 kB
  • sloc: cpp: 476,472; python: 76,538; ansic: 29,510; javascript: 6,792; sh: 47; makefile: 24
file content (41 lines) | stat: -rw-r--r-- 1,128 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef _CE_TYPES_H
#define _CE_TYPES_H

#include"os_python.h"

/*
// Typical XYZ point and array of points
*/
typedef struct {
	double x;
	double y;
	double z;
} cePoint, *pcePoint;

/*
// An AFP (aligned fragment pair), and list/pointer
*/
typedef struct {
	int first;
	int second;
} afp, *path, **pathCache;

/////////////////////////////////////////////////////////////////////////////
// Function Declarations
/////////////////////////////////////////////////////////////////////////////
// Calculates the CE Similarity Matrix
double** calcS(double** d1, double** d2, int lenA, int lenB, int wSize);

// calculates a simple distance matrix
double** calcDM(pcePoint coords, int len);

// Converter: Python Object -> C Structs
pcePoint getCoords( PyObject* L, int len );

// Optimal path finding algorithm (CE).
pathCache findPath(double** S, double** dA, double**dB, int lenA, int lenB, float D0, float D1, int winSize, int gapMax, int* bufferSize);

// filter through the results and find the best
PyObject* findBest( pcePoint coordsA, pcePoint coordsB, pathCache paths, int bufferSize, int smaller, int winSize );

#endif