# Path: reservoir_nn/utils/weight_properties.py
# def print_network_statistics(weight, plot_weight=False):
# def get_network_statistics(weight):
# def get_inhibitory_proportion_of_total_strength(weight):
# def get_inhibitory_neuron_indices(weight):
# def get_sparsity(matrix: np.ndarray, thres=0.0) -> float:
# def get_spectral_radius(square_matrix: np.ndarray) -> float:


from absl.testing import absltest
from absl.testing import parameterized
from reservoir_nn.utils import weight_properties
import networkx as nx
import numpy as np
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Tests for weight_properties."""





class NetworkStatisticsTest(absltest.TestCase):

  def test_it_computes_the_right_statistics_value(self):
    weight = nx.to_numpy_array(nx.house_graph())

# Path: reservoir_nn/utils/weight_properties.py
# def print_network_statistics(weight, plot_weight=False):
# def get_network_statistics(weight):
# def get_inhibitory_proportion_of_total_strength(weight):
# def get_inhibitory_neuron_indices(weight):
# def get_sparsity(matrix: np.ndarray, thres=0.0) -> float:
# def get_spectral_radius(square_matrix: np.ndarray) -> float:


# Path: reservoir_nn/utils/weight_properties_test.py
from absl.testing import absltest
from absl.testing import parameterized
from reservoir_nn.utils import weight_properties
import networkx as nx
import numpy as np

# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Tests for weight_properties."""





class NetworkStatisticsTest(absltest.TestCase):

  def test_it_computes_the_right_statistics_value(self):
    weight = nx.to_numpy_array(nx.house_graph())

    stats = weight_properties.get_network_statistics(weight)