nns.c  1.0.1
Nanowire Network simulator
interface.h
Go to the documentation of this file.
1 
20 #ifndef INTERFACE_H
21 #define INTERFACE_H
22 
23 #include <stdbool.h>
24 
25 #include "interface/connection.h"
26 
44 typedef struct
45 {
48 
51 
53  int* loads_index;
54  double* loads_weight;
56 } interface;
57 
65 int itcmp(const void* e1, const void* e2);
66 
71 interface copy_interface(const interface it);
72 
79 
80 #endif /* INTERFACE_H */
Defines the enumeration for the possible connection states of an electrode to a specific nanowire in ...
void destroy_interface(interface it)
Destroy an interface memorized in the stack. This function practically frees the masks and weights of...
Definition: interface.c:51
int itcmp(const void *e1, const void *e2)
Compare two network interfaces according to the number of sources, grounds, and loads.
Definition: interface.c:7
interface copy_interface(const interface it)
Create a deep copy of an interface.
Definition: interface.c:27
Interface between the nanowire-network device and external systems.
Definition: interface.h:45
int loads_count
Number of loads connected to the device.
Definition: interface.h:52
int * loads_index
Index of the output nanowires.
Definition: interface.h:53
int * sources_index
Index of the input nanowires.
Definition: interface.h:47
int * grounds_index
Index of the output nanowires.
Definition: interface.h:50
int sources_count
Number of sources connected to the device.
Definition: interface.h:46
double * loads_weight
Definition: interface.h:54
int grounds_count
Number of grounds connected to the device.
Definition: interface.h:49