SetsOps
Stay organized with collections
Save and categorize content based on your preferences.
Implementation of set operations
Inherited Methods
From class
java.lang.Object
boolean
|
equals(Object arg0)
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
Public Methods
public
static
Operand<T>
difference
(Ops tf, Operand<T> a, Operand<T> b, boolean aMinusB)
Computes set difference of elements in last dimension of a
and b
.
All but the last dimension of a
and b
must match
Parameters
tf |
the TensorFlow Ops |
a |
The first operand representing set a |
b |
The other operand representing set b |
aMinusB |
whether to subtract b from a, vs vice versa. |
Returns
- An Operand with the same rank as
a
and b
, and all but the
last dimension the * same. Elements along the last dimension contain the results of the set
operation.
public
static
Operand<T>
difference
(Ops tf, Operand<T> a, Operand<T> b)
Computes set difference of elements in last dimension of a
and b
with
aMinusB
set to true.
All but the last dimension of a
and b
must match
Parameters
tf |
the TensorFlow Ops |
a |
The first operand representing set a |
b |
The other operand representing set b |
Returns
- An Operand with the same rank as
a
and b
, and all but the
last dimension the * same. Elements along the last dimension contain the results of the set
operation.
public
static
Operand<T>
intersection
(Ops tf, Operand<T> a, Operand<T> b)
Computes set intersection of elements in last dimension of a
and b
.
Parameters
tf |
the TensorFlow Ops |
a |
The first operand representing set a |
b |
The other operand representing set b |
Returns
- An Operand with the same rank as
a
and b
, and all but the
last dimension the * same. Elements along the last dimension contain the results of the set
operation.
Compute set operation of elements in last dimension of a
and b
.
Parameters
tf |
the TensorFlow Ops |
a |
The first set operation operand |
b |
The other et operation operand |
setOperation |
The set operation to perform, SetsOps.Operation . |
Returns
- An Operand with the same rank as
a
and b
, and all but the
last dimension the same. Elements along the last dimension contain the results of the set
operation.
public
static
Operand<T>
union
(Ops tf, Operand<T> a, Operand<T> b)
Computes set union of elements in last dimension of a
and b
.
Parameters
tf |
the TensorFlow Ops |
a |
The first operand representing set a |
b |
The other operand representing set b |
Returns
- An Operand with the same rank as
a
and b
, and all but the
last dimension the * same. Elements along the last dimension contain the results of the set
operation.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-11-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-11-29 UTC."],[],[],null,["# SetsOps\n\npublic class **SetsOps** \nImplementation of set operations \n\n### Nested Classes\n\n|------|---|---|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| enum | [SetsOps.Operation](/jvm/api_docs/java/org/tensorflow/framework/metrics/impl/SetsOps.Operation) || Enumeration containing the string operation values to be passed to the TensorFlow Sparse Ops function [ERROR(/SparseOps#denseToDenseSetOperation)]() |\n\n### Public Constructors\n\n|---|-----------------------------------------------------------------------------------------|\n| | [SetsOps](/jvm/api_docs/java/org/tensorflow/framework/metrics/impl/SetsOps#SetsOps())() |\n\n### Public Methods\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static \\\u003cT extends [TNumber](/jvm/api_docs/java/org/tensorflow/types/family/TNumber)\\\u003e [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e | [difference](/jvm/api_docs/java/org/tensorflow/framework/metrics/impl/SetsOps#difference(Ops, org.tensorflow.Operand\u003cT\u003e, org.tensorflow.Operand\u003cT\u003e, boolean))(Ops tf, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e a, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e b, boolean aMinusB) Computes set difference of elements in last dimension of `a` and `b`. |\n| static \\\u003cT extends [TNumber](/jvm/api_docs/java/org/tensorflow/types/family/TNumber)\\\u003e [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e | [difference](/jvm/api_docs/java/org/tensorflow/framework/metrics/impl/SetsOps#difference(Ops, org.tensorflow.Operand\u003cT\u003e, org.tensorflow.Operand\u003cT\u003e))(Ops tf, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e a, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e b) Computes set difference of elements in last dimension of `a` and `b` with `aMinusB` set to true. |\n| static \\\u003cT extends [TNumber](/jvm/api_docs/java/org/tensorflow/types/family/TNumber)\\\u003e [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e | [intersection](/jvm/api_docs/java/org/tensorflow/framework/metrics/impl/SetsOps#intersection(Ops, org.tensorflow.Operand\u003cT\u003e, org.tensorflow.Operand\u003cT\u003e))(Ops tf, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e a, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e b) Computes set intersection of elements in last dimension of `a` and `b`. |\n| static \\\u003cT extends [TNumber](/jvm/api_docs/java/org/tensorflow/types/family/TNumber)\\\u003e [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e | [setOperation](/jvm/api_docs/java/org/tensorflow/framework/metrics/impl/SetsOps#setOperation(Ops, org.tensorflow.Operand\u003cT\u003e, org.tensorflow.Operand\u003cT\u003e, org.tensorflow.framework.metrics.impl.SetsOps.Operation))(Ops tf, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e a, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e b, [SetsOps.Operation](/jvm/api_docs/java/org/tensorflow/framework/metrics/impl/SetsOps.Operation) setOperation) Compute set operation of elements in last dimension of `a` and `b`. |\n| static \\\u003cT extends [TNumber](/jvm/api_docs/java/org/tensorflow/types/family/TNumber)\\\u003e [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e | [union](/jvm/api_docs/java/org/tensorflow/framework/metrics/impl/SetsOps#union(Ops, org.tensorflow.Operand\u003cT\u003e, org.tensorflow.Operand\u003cT\u003e))(Ops tf, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e a, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e b) Computes set union of elements in last dimension of `a` and `b`. |\n\n### Inherited Methods\n\nFrom class java.lang.Object \n\n|------------------|---------------------------|\n| boolean | equals(Object arg0) |\n| final Class\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| String | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Constructors\n-------------------\n\n#### public\n**SetsOps**\n()\n\n\u003cbr /\u003e\n\nPublic Methods\n--------------\n\n#### public static [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e\n**difference**\n(Ops tf, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e a, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e b, boolean aMinusB)\n\nComputes set difference of elements in last dimension of `a` and `b`.\n\nAll but the last dimension of `a` and `b` must match\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| tf | the TensorFlow Ops |\n| a | The first operand representing set `a` |\n| b | The other operand representing set `b` |\n| aMinusB | whether to subtract b from a, vs vice versa. |\n|---------|----------------------------------------------|\n\n##### Returns\n\n- An Operand with the same rank as `a` and `b`, and all but the last dimension the \\* same. Elements along the last dimension contain the results of the set operation. \n\n#### public static [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e\n**difference**\n(Ops tf, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e a, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e b)\n\nComputes set difference of elements in last dimension of `a` and `b` with\n`aMinusB` set to true.\n\nAll but the last dimension of `a` and `b` must match\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| tf | the TensorFlow Ops |\n| a | The first operand representing set `a` |\n| b | The other operand representing set `b` |\n|----|----------------------------------------|\n\n##### Returns\n\n- An Operand with the same rank as `a` and `b`, and all but the last dimension the \\* same. Elements along the last dimension contain the results of the set operation. \n\n#### public static [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e\n**intersection**\n(Ops tf, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e a, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e b)\n\nComputes set intersection of elements in last dimension of `a` and `b`. \n\n##### Parameters\n\n| tf | the TensorFlow Ops |\n| a | The first operand representing set `a` |\n| b | The other operand representing set `b` |\n|----|----------------------------------------|\n\n##### Returns\n\n- An Operand with the same rank as `a` and `b`, and all but the last dimension the \\* same. Elements along the last dimension contain the results of the set operation. \n\n#### public static [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e\n**setOperation**\n(Ops tf, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e a, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e b, [SetsOps.Operation](/jvm/api_docs/java/org/tensorflow/framework/metrics/impl/SetsOps.Operation) setOperation)\n\nCompute set operation of elements in last dimension of `a` and `b`. \n\n##### Parameters\n\n| tf | the TensorFlow Ops |\n| a | The first set operation operand |\n| b | The other et operation operand |\n| setOperation | The set operation to perform, [SetsOps.Operation](/jvm/api_docs/java/org/tensorflow/framework/metrics/impl/SetsOps.Operation). |\n|--------------|--------------------------------------------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- An Operand with the same rank as `a` and `b`, and all but the last dimension the same. Elements along the last dimension contain the results of the set operation. \n\n#### public static [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e\n**union**\n(Ops tf, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e a, [Operand](/jvm/api_docs/java/org/tensorflow/Operand)\\\u003cT\\\u003e b)\n\nComputes set union of elements in last dimension of `a` and `b`. \n\n##### Parameters\n\n| tf | the TensorFlow Ops |\n| a | The first operand representing set `a` |\n| b | The other operand representing set `b` |\n|----|----------------------------------------|\n\n##### Returns\n\n- An Operand with the same rank as `a` and `b`, and all but the last dimension the \\* same. Elements along the last dimension contain the results of the set operation."]]