<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="_model__neighbors_8cpp">
<title>/Users/bernard/b20/bsoft/src/model/model_neighbors.cpp File Reference</title>
<indexterm><primary>/Users/bernard/b20/bsoft/src/model/model_neighbors.cpp</primary></indexterm>
<para>

<para>Functions to manipulate model component neighbors. </para>
 
</para>
<programlisting>#include &quot;model_neighbors.h&quot;
#include &quot;model_util.h&quot;
#include &quot;linked_list.h&quot;
#include &quot;utilities.h&quot;
</programlisting><simplesect>
    <title>Functions    </title>
        <itemizedlist>
            <listitem><para>int <link linkend="_model__neighbors_8cpp_1abae973a7a0182c5f36da932d21141c5c">model_set_neighbors</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, int number)</para>

<para>Sets the desired number of components as neighbors for each component. </para>
</listitem>
            <listitem><para>int <link linkend="_model__neighbors_8cpp_1aaef8e963978ee7fb0db401d6ca06f8f5">model_set_neighbors</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>, int number, double <link linkend="__vector3_8h_1aa60745aa4e45acde64f733424e37dbb9">distance</link>)</para>
</listitem>
            <listitem><para>int <link linkend="_model__neighbors_8cpp_1af8858ff4a3bffc0bf2a67c11e546fa88">model_neighbor_reciprocity</link> (<link linkend="_struct_bmodel">Bmodel</link> *<link linkend="_tcltk__bmodel_8cpp_1a828359eaa8de833b547ac96934f43841">model</link>)</para>

<para>Counts how many neighbors of a component also has that component as a neighbor. </para>
</listitem>
        </itemizedlist>
</simplesect>
<simplesect>
    <title>Variables    </title>
        <itemizedlist>
            <listitem><para>int <link linkend="_model__neighbors_8cpp_1a0b2caeb4b6f130be43e5a2f0267dd453">verbose</link></para>
</listitem>
        </itemizedlist>
</simplesect>
<section>
<title>Detailed Description</title>

<para>Functions to manipulate model component neighbors. </para>

<para><formalpara><title>Author: </title>

<para>Bernard Heymann </para>
</formalpara>
<formalpara><title>Date: </title>

<para>Created: 20010828 </para>

<para>Modified: 20141006 </para>
</formalpara>
</para>
</section>
<section>
<title>Function Documentation</title>
<anchor xml:id="_model__neighbors_8cpp_1af8858ff4a3bffc0bf2a67c11e546fa88"/>    <section>
    <title>model_neighbor_reciprocity()</title>
<indexterm><primary>model_neighbor_reciprocity</primary><secondary>model_neighbors.cpp</secondary></indexterm>
<indexterm><primary>model_neighbors.cpp</primary><secondary>model_neighbor_reciprocity</secondary></indexterm>
<para><computeroutput>int model_neighbor_reciprocity (<link linkend="_struct_bmodel">Bmodel</link> * model)</computeroutput></para><para>

<para>Counts how many neighbors of a component also has that component as a neighbor. </para>
</para>

<para><literallayout><computeroutput>For each neighbor of component, the neighbor list of the neighbor is searched
for the id of the first component.
Only the first model in the linked list is used.
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int number of non-reciprocated neighbors. </para>
</formalpara>
</para>
<para>
Definition at line 149 of file model_neighbors.cpp.</para>
    </section><anchor xml:id="_model__neighbors_8cpp_1abae973a7a0182c5f36da932d21141c5c"/>    <section>
    <title>model_set_neighbors()<computeroutput>[1/2]</computeroutput></title>
<indexterm><primary>model_set_neighbors</primary><secondary>model_neighbors.cpp</secondary></indexterm>
<indexterm><primary>model_neighbors.cpp</primary><secondary>model_set_neighbors</secondary></indexterm>
<para><computeroutput>int model_set_neighbors (<link linkend="_struct_bmodel">Bmodel</link> * model, int number)</computeroutput></para><para>

<para>Sets the desired number of components as neighbors for each component. </para>
</para>

<para><literallayout><computeroutput>For each component, its neighbor list is set to the closest components.
Only the first model in the linked list is used.
</computeroutput></literallayout></para>

<para>
                <formalpara>
                    <title>
Parameters                    </title>
                    <para>
                    <table frame="all">
                        <tgroup cols="2" align="left" colsep="1" rowsep="1">
                        <colspec colwidth="1*"/>
                        <colspec colwidth="4*"/>
                        <tbody>
                            <row>
                                <entry>*model</entry>
                                <entry>
<para>model. </para>
</entry>
                            </row>
                            <row>
                                <entry>number</entry>
                                <entry>
<para>number of neighbors to set. </para>
</entry>
                            </row>
                        </tbody>
                        </tgroup>
                    </table>
                    </para>
                </formalpara>
                <formalpara><title>Returns: </title>

<para>int 0. </para>
</formalpara>
</para>
<para>
Definition at line 28 of file model_neighbors.cpp.</para>
    </section><anchor xml:id="_model__neighbors_8cpp_1aaef8e963978ee7fb0db401d6ca06f8f5"/>    <section>
    <title>model_set_neighbors()<computeroutput>[2/2]</computeroutput></title>
<indexterm><primary>model_set_neighbors</primary><secondary>model_neighbors.cpp</secondary></indexterm>
<indexterm><primary>model_neighbors.cpp</primary><secondary>model_set_neighbors</secondary></indexterm>
<para><computeroutput>int model_set_neighbors (<link linkend="_struct_bmodel">Bmodel</link> * model, int number, double distance)</computeroutput></para><para>
Definition at line 60 of file model_neighbors.cpp.</para>
</section>
</section>
<section>
<title>Variable Documentation</title>
<anchor xml:id="_model__neighbors_8cpp_1a0b2caeb4b6f130be43e5a2f0267dd453"/>    <section>
    <title>verbose</title>
<indexterm><primary>verbose</primary><secondary>model_neighbors.cpp</secondary></indexterm>
<indexterm><primary>model_neighbors.cpp</primary><secondary>verbose</secondary></indexterm>
<para><computeroutput>int verbose</computeroutput></para></section>
</section>
</section>
