Skip to content

Commit e257d84

Browse files
committed
fix error in docstring and readme
1 parent 5fad036 commit e257d84

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ FactorGraph{Int64} with 5 variables, 3 factors, and 6 edges
3434

3535
### Graph navigation
3636
Given a factor graph with $N$ variables and $M$ factors, variables are indexed by $i\in\{1,\ldots,N\}$, factors are indexed by $a\in\{1,\ldots,M\}$.
37-
Properties of a vertex can be queried by wrapping the vertex index in a `variable` or `factor`. For example, the list of neighbors of variable $i=2$ is found by
37+
Properties of a vertex can be queried by wrapping the vertex index in a `v_vertex` or `f_vertex`. For example, the list of neighbors of variable $i=2$ is found by
3838
```julia
3939
julia> ∂i = neighbors(g, variable(2));
4040

@@ -59,7 +59,7 @@ julia> collect(ea)
5959
Querying properties of a vertex without specifying whether it's a variable or a factor will throw an error
6060
```julia
6161
julia> outedges(g, 3)
62-
ERROR: ArgumentError: Properties of a vertex of an `AbstractFactorGraph` such as degree, neighbors, etc. cannot be accessed by an integer. Use a `variable` or `factor` wrapper instead.
62+
ERROR: ArgumentError: Properties of a vertex of an `AbstractFactorGraph` such as degree, neighbors, etc. cannot be accessed by an integer. Use a `v_vertex` or `f_vertex` wrapper instead.
6363
```
6464

6565
## See also

src/factorgraph.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const VariableVertex = Right
55
FactorGraphVertex
66
77
A type to represent a vertex in a bipartite graph, to be passed as an argument to [`neighbors`](@ref), [`inedges`](@ref), [`outedges`](@ref), see examples therein.
8-
It is recommended to use the [`v_vertex`](@ref) and [`fvertex`](@ref) constructors.
8+
It is recommended to use the [`v_vertex`](@ref) and [`f_vertex`](@ref) constructors.
99
"""
1010
const FactorGraphVertex = BipartiteGraphVertex
1111

@@ -284,7 +284,7 @@ end
284284
for method in [:(IndexedGraphs.degree), :(IndexedGraphs.inedges), :(IndexedGraphs.outedges), :(IndexedGraphs.neighbors), :(edge_indices)]
285285
@eval begin
286286
function $method(::AbstractFactorGraph, ::Integer)
287-
return throw(ArgumentError("Properties of a vertex of an `AbstractFactorGraph` such as degree, neighbors, etc. cannot be accessed by an integer. Use a `v_vertex` or `fvertex` wrapper instead.\n"))
287+
return throw(ArgumentError("Properties of a vertex of an `AbstractFactorGraph` such as degree, neighbors, etc. cannot be accessed by an integer. Use a `v_vertex` or `f_vertex` wrapper instead.\n"))
288288
end
289289
end
290290
end

0 commit comments

Comments
 (0)