Record Class NetworkFlowUtil.FlowResult<V>
java.lang.Object
java.lang.Record
cloud.opencode.base.graph.algorithm.NetworkFlowUtil.FlowResult<V>
- Type Parameters:
V- the vertex type | 顶点类型- Record Components:
maxFlow- the maximum flow value | 最大流值edgeFlows- flow on each edge | 每条边上的流量minCut- edges in minimum cut | 最小割中的边
- Enclosing class:
NetworkFlowUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theedgeFlowsrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanhasFlow()Check if flow is valid (max flow is positive) 检查流是否有效(最大流为正)final inthashCode()Returns a hash code value for this object.doublemaxFlow()Returns the value of themaxFlowrecord component.minCut()Returns the value of theminCutrecord component.doubleGet the minimum cut capacity (equals max flow) 获取最小割容量(等于最大流)final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
minCutCapacity
public double minCutCapacity()Get the minimum cut capacity (equals max flow) 获取最小割容量(等于最大流)- Returns:
- min-cut capacity | 最小割容量
-
hasFlow
public boolean hasFlow()Check if flow is valid (max flow is positive) 检查流是否有效(最大流为正)- Returns:
- true if valid | 如果有效返回true
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
maxFlow
-
edgeFlows
-
minCut
-