LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
sn_has_fractional_populations.m
1%{ @file sn_has_fractional_populations.m
2 % @brief Checks if the network has fractional population values
3 %
4 % @author LINE Development Team
5%}
6
7%{
8 % @brief Checks if the network has fractional population values
9 %
10 % @details
11 % Returns true if any class has a non-integer population value.
12 %
13 % @par Syntax:
14 % @code
15 % bool = sn_has_fractional_populations(sn)
16 % @endcode
17 %
18 % @par Parameters:
19 % <table>
20 % <tr><th>Name<th>Description
21 % <tr><td>sn<td>Network structure
22 % </table>
23 %
24 % @par Returns:
25 % <table>
26 % <tr><th>Name<th>Description
27 % <tr><td>bool<td>True if any class has fractional population
28 % </table>
29%}
30function bool = sn_has_fractional_populations(sn)
31% Checks if the network has closed classes with non-integer populations
32bool = any(sn.njobs ~= round(sn.njobs));
33end