#include <boolean.h>
List of all members.
Detailed Description
Boolean switch object. This is a switch predicate object that is applied to two references to elements to switch them as needed by the {Butterfly Switching Network BlackBox Matrix Object}.
Constructor & Destructor Documentation
Constructor from an STL vector of booleans. The switch is applied using the vector of booleans. A true value means to swap the two elements, and a false value means not to. The apply function starts at the beginning of the vector moving forward through it, and applyTranspose function starts at the end moving backwards. Both repeat the vector after they pass through it.
- Parameters:
-
| switches | vector of switches |
Member Function Documentation
Apply switch function. Switches the elements in references according to current boolean value. Swaps the elements if boolean is true, otherwise does nothing. It is templatized by the element type to be swapped.
- Returns:
- bool true if swapped, false otherwise
- Parameters:
-
| x | reference to first element to be switched |
| y | reference to second element to be switched |
Apply switch transpose function. Switches the elements in references according to current boolean value. Swaps the elements if boolean is true, otherwise does nothing. It is templatized by the element type to be swapped.
- Returns:
- bool true if swapped, false otherwise
- Parameters:
-
| x | reference to first element to be switched |
| y | reference to second element to be switched |
The documentation for this class was generated from the following file:
- /builddir/build/BUILD/linbox-1.1.7/linbox/switch/boolean.h