xor.rst 1.68 KB
Newer Older
Adam Procter's avatar
Adam Procter committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
.. xor.rst:

###
Xor
###

.. code-block:: cpp

   Xor  // Elementwise logical-xor operation


Description
===========

Produces tensor with boolean element type and shape as the two inputs,
which must themselves have boolean element type, where the value at each
coordinate of ``output`` is ``0`` (true) if ``arg0`` or ``arg1`` both
zero or both nonzero, or ``1`` otherwise.


Inputs
------

+-----------------+------------------------------+--------------------------------+
| Name            | Element Type                 | Shape                          |
+=================+==============================+================================+
| ``arg0``        | ``ngraph::element::boolean`` | any                            |
+-----------------+------------------------------+--------------------------------+
| ``arg1``        | ``ngraph::element::boolean`` | same as ``arg0``               |
+-----------------+------------------------------+--------------------------------+

Outputs
-------

+-----------------+------------------------------+--------------------------------+
| Name            | Element Type                 | Shape                          |
+=================+==============================+================================+
| ``output``      | ``ngraph::element::boolean`` | same as ``arg0``               |
+-----------------+------------------------------+--------------------------------+


Mathematical Definition
=======================

.. math::

   \mathtt{output}_{i_0, \ldots, i_{n-1}} = \mathtt{arg0}_{i_0, \ldots, i_{n-1}}\, \mathtt{XOR}\, \mathtt{arg1}_{i_0, \ldots, i_{n-1}}


C++ Interface
=============

53
.. doxygenclass:: ngraph::op::v0::Xor
Adam Procter's avatar
Adam Procter committed
54 55
   :project: ngraph
   :members: