Skip to content

Commit 2c2cdef

Browse files
committed
polish naming
1 parent 1080041 commit 2c2cdef

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

docs/src/api/public.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ read_instance
6262
read_evidence
6363
read_solution
6464
read_queryvars
65-
read_instance_from_file
65+
read_instance_file
6666
read_evidence_file
6767
read_solution_file
6868
read_td_file

examples/asia/main.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ using TensorInference
5151
# Load the ASIA network model from the `asia.uai` file located in the examples
5252
# directory. See [Model file format (.uai)](@ref) for a description of the
5353
# format of this file.
54-
instance = read_instance_from_file(pkgdir(TensorInference, "examples", "asia", "asia.uai"))
54+
instance = read_instance_file(pkgdir(TensorInference, "examples", "asia", "asia.uai"))
5555

5656
# ---
5757

src/TensorInference.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export RescaledArray
1818
export contraction_complexity, TreeSA, GreedyMethod, KaHyParBipartite, SABipartite, MergeGreedy, MergeVectors
1919

2020
# read and load uai files
21-
export read_instance_from_file, read_td_file, read_evidence_file, read_solution_file
21+
export read_instance_file, read_td_file, read_evidence_file, read_solution_file
2222
export problem_from_artifact, ArtifactProblemSpec
2323
export read_instance, UAIInstance, read_evidence, read_solution, read_queryvars, dataset_from_artifact
2424

src/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ format. If the provided file path is empty, return `nothing`.
77
The UAI file formats are defined in:
88
https://uaicompetition.github.io/uci-2022/file-formats/
99
"""
10-
function read_instance_from_file(instance_filepath::AbstractString; factor_eltype = Float64)::UAIInstance
10+
function read_instance_file(instance_filepath::AbstractString; factor_eltype = Float64)::UAIInstance
1111
# Read the uai file into an array of lines
1212
str = open(instance_filepath) do file
1313
read(file, String)
@@ -221,7 +221,7 @@ Read an UAI instance from an artifact.
221221
"""
222222
function read_instance(instance::ArtifactProblemSpec; eltype=Float64)
223223
problem_name = "$(instance.problem_set)_$(instance.problem_id).uai"
224-
return read_instance_from_file(joinpath(instance.artifact_path, instance.task, problem_name); factor_eltype = eltype)
224+
return read_instance_file(joinpath(instance.artifact_path, instance.task, problem_name); factor_eltype = eltype)
225225
end
226226

227227
"""

0 commit comments

Comments
 (0)