From 3aee2fd43e3059a699af2b63c6f2395e5a55e515 Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Wed, 27 Sep 2017 15:06:31 +0100 Subject: First commit on github -- NetBunch 1.0 --- doc/power_law.1 | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 doc/power_law.1 (limited to 'doc/power_law.1') diff --git a/doc/power_law.1 b/doc/power_law.1 new file mode 100644 index 0000000..bfe45fd --- /dev/null +++ b/doc/power_law.1 @@ -0,0 +1,160 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "POWER_LAW" "1" "September 2017" "www.complex-networks.net" "www.complex-networks.net" +. +.SH "NAME" +\fBpower_law\fR \- Sample N integers from a discrete power\-law distribution +. +.SH "SYNOPSIS" +\fBpower_law\fR \fIgamma\fR \fIk_min\fR \fIk_max\fR \fIN\fR +. +.SH "DESCRIPTION" +\fBpower_law\fR samples \fIN\fR elements from the discrete power\-law distribution +. +.IP "" 4 +. +.nf + +P(k) ~ k^{gamma} +. +.fi +. +.IP "" 0 +. +.P +where +. +.IP "" 4 +. +.nf + +k_min <= k <= k_max, gamma < 1 +. +.fi +. +.IP "" 0 +. +.P +The program can be used to generate a power\-law degree distribution with an assigned value of the exponent pl_\-3\.0_3_50_1000 +. +.fi +. +.IP "" 0 +. +.SH "RETURN VALUES" +The value returned by \fBpower_law\fR can be used to test whether the sum of the resulting set of samples is even or odd\. Under Windows PowerShell, you can check the last exit code by inspecting the variable \fB$lastExitCode\fR right after executing \fBpower_law\fR, as in: +. +.IP "" 4 +. +.nf + +> power_law \-2\.7 4 300 5000 > pl_\-2\.7_4_300_5000 +> $lastExitCode + +0 +> +. +.fi +. +.IP "" 0 +. +.P +In this case, the exit code is \fB0\fR, meaning that the resulting set of samples has an even sum (and can be thus used as a degree sequence)\. Under Linux/MacOS/Unix (and in general when using any POSIX\-compliant shell) you should check the value of the variable \fB$?\fR, right after executing \fBpower_law\fR, i\.e\.: +. +.IP "" 4 +. +.nf + +$ power_law \-2\.5 3 500 5000 > pl_\-2\.5_3_500_5000 +$ echo $? +1 +$ +. +.fi +. +.IP "" 0 +. +.P +Notice that this particular run of \fBpower_law\fR has produced a sequence with an odd sum, which thus cannot correspond to a valid degree sequence\. +. +.SH "SEE ALSO" +deg_seq(1), conf_model_deg(1), conf_model_deg_nocheck(1) +. +.SH "REFERENCES" +. +.IP "\(bu" 4 +V\. Latora, V\. Nicosia, G\. Russo, "Complex Networks: Principles, Methods and Applications", Chapter 5, Cambridge University Press (2017) +. +.IP "\(bu" 4 +V\. Latora, V\. Nicosia, G\. Russo, "Complex Networks: Principles, Methods and Applications", Appendix 9, Cambridge University Press (2017) +. +.IP "" 0 +. +.SH "AUTHORS" +(c) Vincenzo \'KatolaZ\' Nicosia 2009\-2017 \fB\fR\. -- cgit v1.2.3