# Path: tensorflow_lattice/python/utils.py
# def canonicalize_convexity(convexity):
# def canonicalize_input_bounds(input_bounds):
# def canonicalize_monotonicity(monotonicity, allow_decreasing=True):
# def canonicalize_monotonicities(monotonicities, allow_decreasing=True):
# def canonicalize_trust(trusts):
# def canonicalize_unimodalities(unimodalities):
# def count_non_zeros(*iterables):


from absl.testing import parameterized
from tensorflow_lattice.python import utils
import tensorflow as tf
# Copyright 2020 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 Tensorflow Lattice utility functions."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function



class UtilsTest(parameterized.TestCase, tf.test.TestCase):

  @parameterized.parameters((-1, -1), (0, 0), (1, 1), ("concave", -1),
                            ("none", 0), ("convex", 1))
  def testCanonicalizeConvexity(self, convexity,
                                expected_canonicalized_convexity):

# Path: tensorflow_lattice/python/utils.py
# def canonicalize_convexity(convexity):
# def canonicalize_input_bounds(input_bounds):
# def canonicalize_monotonicity(monotonicity, allow_decreasing=True):
# def canonicalize_monotonicities(monotonicities, allow_decreasing=True):
# def canonicalize_trust(trusts):
# def canonicalize_unimodalities(unimodalities):
# def count_non_zeros(*iterables):


# Path: tensorflow_lattice/python/utils_test.py
from absl.testing import parameterized
from tensorflow_lattice.python import utils
import tensorflow as tf

# Copyright 2020 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 Tensorflow Lattice utility functions."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function



class UtilsTest(parameterized.TestCase, tf.test.TestCase):

  @parameterized.parameters((-1, -1), (0, 0), (1, 1), ("concave", -1),
                            ("none", 0), ("convex", 1))
  def testCanonicalizeConvexity(self, convexity,
                                expected_canonicalized_convexity):

    canonicalized_convexity = utils.canonicalize_convexity(convexity)