<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BNW/sourcecodes/network_layout_inv.php, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>http://git.genenetwork.org/BNW/atom?h=main</id>
<link rel='self' href='http://git.genenetwork.org/BNW/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.genenetwork.org/BNW/'/>
<updated>2026-08-17T19:53:21+00:00</updated>
<entry>
<title>Guard arithmetic on file/shell-output-derived values against non-numeric strings</title>
<updated>2026-08-17T19:53:21+00:00</updated>
<author>
<name>Claude Sonnet 5</name>
</author>
<published>2026-08-17T19:32:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.genenetwork.org/BNW/commit/?id=a1f64bda77d74026d663eca91b975a6ff869d9a3'/>
<id>urn:sha1:a1f64bda77d74026d663eca91b975a6ff869d9a3</id>
<content type='text'>
PHP 8 throws a fatal TypeError for arithmetic (+ - * /) on a
non-numeric string ("Unsupported operand types"); PHP 7.4 only warned
and treated it as 0. Several files perform arithmetic directly on
values parsed from intermediate state files (nnode.txt, nrows.txt,
structure_input*.txt) or from `dot -Tplain` output, with no
is_numeric() check — safe as long as those files are well-formed, but
a crash risk if a file is missing/empty/truncated or a `dot` output
line doesn't parse as expected.

Affected: runtime_check.php ($node, $nrows), remove_variables.php and
create_tiers_gom_part1.php ($maxplist=$node-1), mat_structure.php
(matrix cell multiplication), and the four network_layout_{evd,inv}[,_2].php
files ($r_index=$node+N and the dot-output-derived $cell arithmetic in
the _2 variants).

Fix pattern: coalesce to 0 via `is_numeric($x) ? $x : 0` before the
arithmetic, matching PHP 7.4's original fallback-to-0 behavior instead
of crashing.

Verified empirically against PHP 8.3.28 with runtime_check.php and
mat_structure.php: previously, a missing/empty source file caused
  TypeError: Unsupported operand types: string - int (or string * int)
after the fix, the same missing-file scenario produces only the
pre-existing "undefined array key" warnings (same as PHP 7.4) and the
function completes and returns a value instead of crashing.

Reviewed by: Frederick M Muriithi &lt;fredmanglis@gmail.com&gt;
</content>
</entry>
<entry>
<title>Moving final GENENET8 version to master</title>
<updated>2021-02-24T21:19:03+00:00</updated>
<author>
<name>ziejd2</name>
</author>
<published>2021-02-24T21:19:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.genenetwork.org/BNW/commit/?id=1427e9bf4f85823164b4573a3bcf1ba3ba6b04d0'/>
<id>urn:sha1:1427e9bf4f85823164b4573a3bcf1ba3ba6b04d0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>GENENET8 update</title>
<updated>2021-02-24T20:36:59+00:00</updated>
<author>
<name>ziejd2</name>
</author>
<published>2021-02-24T20:36:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.genenetwork.org/BNW/commit/?id=25b843f6bbacb1937bdb960777b73acbece64115'/>
<id>urn:sha1:25b843f6bbacb1937bdb960777b73acbece64115</id>
<content type='text'>
</content>
</entry>
<entry>
<title>New parameter learning options</title>
<updated>2018-09-14T04:59:20+00:00</updated>
<author>
<name>ziejd2</name>
</author>
<published>2018-09-14T04:59:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.genenetwork.org/BNW/commit/?id=e3f7237ffcb19f19db3b68777b5a94b89e07f66a'/>
<id>urn:sha1:e3f7237ffcb19f19db3b68777b5a94b89e07f66a</id>
<content type='text'>
The main change here is in the parameter learning methods.  The parameters that are learned at first (i.e., if there is no evidence) are the distributions that are found directly in the data. I had to create or significantly modify several BNT files for this.

If there is evidence, the parameters are learned using a Dirichlet prior. This only required a couple of small changes to the BNW parameter learning files.
</content>
</entry>
<entry>
<title>Bug fixes, code comments, and minor changes</title>
<updated>2018-04-25T21:43:19+00:00</updated>
<author>
<name>ziejd2</name>
</author>
<published>2018-04-25T21:43:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.genenetwork.org/BNW/commit/?id=74b673ba4a706085201a5610b938ff98f08f641d'/>
<id>urn:sha1:74b673ba4a706085201a5610b938ff98f08f641d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Separating Octave and php calculations</title>
<updated>2018-03-15T04:19:16+00:00</updated>
<author>
<name>ziejd2</name>
</author>
<published>2018-03-15T04:19:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.genenetwork.org/BNW/commit/?id=c80226899f5cdd9f11c163817d59445213f5bef0'/>
<id>urn:sha1:c80226899f5cdd9f11c163817d59445213f5bef0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add files via upload</title>
<updated>2017-09-14T20:57:50+00:00</updated>
<author>
<name>ziejd2</name>
</author>
<published>2017-09-14T20:39:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.genenetwork.org/BNW/commit/?id=c4f926438dcb8abe805e910399940f79ff643c4b'/>
<id>urn:sha1:c4f926438dcb8abe805e910399940f79ff643c4b</id>
<content type='text'>
</content>
</entry>
</feed>
