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

Defines the function to calculate the resistance distance between two points in a Nanowire Network Connected Component. More...

#include "device/network.h"
#include "device/component.h"

Go to the source code of this file.

Functions

double resistive_distance (const network_state ns, const connected_component cc, int a, int b)
 Calculate the resistance distance between two points of a Nanowire Network Connected Component. More...
 

Detailed Description

Defines the function to calculate the resistance distance between two points in a Nanowire Network Connected Component.

This file contains the declaration of the function resistive_distance which computes the equivalent resistance between two nanowires in a connected component of a Nanowire Network. The measure is based on the circuital state of the network.

Note
If the two nanowires are not connected, the function returns -1 as an error value.

Function Documentation

◆ resistive_distance()

double resistive_distance ( const network_state  ns,
const connected_component  cc,
int  a,
int  b 
)

Calculate the resistance distance between two points of a Nanowire Network Connected Component.

Parameters
[in]nsThe Nanowire Network circuital state on which perform the measure.
[in]ccThe Connected Component of the Nanowire Network on which perform the measure.
[in]aThe index of the first nanowire to consider for the calculation (relative to the Connected Component).
[in]bThe index of the second nanowire to consider for the calculation (relative to the Connected Component).
Returns
The resistance of the Nanowire Network equivalent circuit between the two points. -1 if an error occurs (e.g. if the two nanowires are not connected).