eccLib 1.3.0
Python library for bioinformatics written in C
Loading...
Searching...
No Matches
GtfDict.h File Reference

Defines the GtfDict object interface. More...

#include <Python.h>
#include "../../hashmap_ext.h"
Include dependency graph for GtfDict.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GtfDict
 A dict that holds GTF data. More...
 

Macros

#define GtfDict_check(o)
 Checks if the object can be interpreted as a GtfDict.
 

Functions

int GtfDict_containsValue (GtfDict *self, PyObject *other)
 Internal function for checking if the other dict is contained within self. Linked as contains and contains()
 
PyObject * GtfDict_keys (GtfDict *restrict self)
 GtfDict.keys()
 
PyObject * GtfDict_getitem (GtfDict *restrict self, PyObject *restrict key)
 A custom getitem that also checks the core attributes.
 
long hausdorf_distance (GtfDict *restrict a, long start, long end)
 Calculates the hausdorf distance between a GtfDict and a range.
 

Variables

PyTypeObject GtfDictType
 The Python type definition for the GtfDict object.
 

Detailed Description

Defines the GtfDict object interface.

Macro Definition Documentation

◆ GtfDict_check

#define GtfDict_check ( o)
Value:
PyType_IsSubtype(Py_TYPE(o), &GtfDictType)
PyTypeObject GtfDictType
The Python type definition for the GtfDict object.
Definition GtfDict.c:1208

Checks if the object can be interpreted as a GtfDict.

Parameters
othe object to check
Returns
true if the object can be interpreted as a GtfDict, false otherwise

Function Documentation

◆ GtfDict_containsValue()

int GtfDict_containsValue ( GtfDict * self,
PyObject * other )

Internal function for checking if the other dict is contained within self. Linked as contains and contains()

Parameters
self
otherthe other object that might be contained
Returns
C bool describing
See also
GtfDict_contains

◆ hausdorf_distance()

long hausdorf_distance ( GtfDict *restrict a,
long start,
long end )

Calculates the hausdorf distance between a GtfDict and a range.

The Hausdorf distance is the maximum distance between two points in two sets. In this case, it is the maximum distance between the start and end of two GtfDicts

Parameters
athe first GtfDict
startthe start of the range to compare
endthe end of the range to compare
Returns
the Hausdorf distance between the two ranges
Here is the caller graph for this function: