nns.c  1.0.1
Nanowire Network simulator
wires.h File Reference

Contains an utilities to build a nanowire network. Not supposed to be used directly by the user. More...

#include <stdbool.h>
#include "device/datasheet.h"
#include "device/junction.h"
#include "device/network.h"
#include "device/wire.h"

Go to the source code of this file.

Functions

wiredrop_wires (const datasheet ds)
 Given the Nanowire Network description (i.e., the datasheet), produce it by dropping the specified number of nanowires into the package according to a normal distribution. More...
 
void detect_junctions (const datasheet ds, const wire *ws, junction **js, int *js_count)
 Detect the junctions between the nanowires composing the Nanowire Network. More...
 
bool ** construe_adjacency_matrix (const datasheet ds, const network_topology nt)
 Given the datasheet and the network topology, construe the Nanowire Network adjacency matrix identifying the junctions between the nanowires. More...
 

Detailed Description

Contains an utilities to build a nanowire network. Not supposed to be used directly by the user.

Function Documentation

◆ construe_adjacency_matrix()

bool** construe_adjacency_matrix ( const datasheet  ds,
const network_topology  nt 
)

Given the datasheet and the network topology, construe the Nanowire Network adjacency matrix identifying the junctions between the nanowires.

Parameters
ds[in]The datasheet describing the Nanowire Network.
nt[in]The topology of the Nanowire Network.
Returns
The adjacency matrix identifying the junctions between the wires.

◆ detect_junctions()

void detect_junctions ( const datasheet  ds,
const wire ws,
junction **  js,
int *  js_count 
)

Detect the junctions between the nanowires composing the Nanowire Network.

Parameters
ds[in]The datasheet describing the Nanowire Network.
ws[in]An array containing the information of the dropped wires.
js[out]An uninitialized pointer to a vector of junctions to be filled and returned.
js_count[out]The number of unique identified junctions. This means that a junction between A and B will be present only once in the array.

◆ drop_wires()

wire* drop_wires ( const datasheet  ds)

Given the Nanowire Network description (i.e., the datasheet), produce it by dropping the specified number of nanowires into the package according to a normal distribution.

Parameters
[in]Thedatasheet describing the Nanowire Network.
Returns
An array containing the information of the dropped wires.