Module: IGraph
- Defined in:
- lib/igraph.rb,
lib/igraph/version.rb,
lib/igraph/libigraph.rb,
lib/igraph/libigraph/error.rb,
lib/igraph/libigraph/games.rb,
lib/igraph/libigraph/paths.rb,
lib/igraph/libigraph/matrix.rb,
lib/igraph/libigraph/vector.rb,
lib/igraph/libigraph/datatype.rb,
lib/igraph/libigraph/topology.rb,
lib/igraph/libigraph/bipartite.rb,
lib/igraph/libigraph/constants.rb,
lib/igraph/libigraph/interface.rb,
lib/igraph/libigraph/operators.rb,
lib/igraph/libigraph/centrality.rb,
lib/igraph/libigraph/structural.rb,
lib/igraph/libigraph/constructors.rb,
lib/igraph/libigraph/transitivity.rb
Defined Under Namespace
Modules: LibIGraph Classes: Error
Constant Summary collapse
- VERSION =
"0.0.1"
Class Attribute Summary collapse
-
.lib_path ⇒ Object
Returns the value of attribute lib_path.
Class Method Summary collapse
Class Attribute Details
.lib_path ⇒ Object
Returns the value of attribute lib_path.
9 10 11 |
# File 'lib/igraph.rb', line 9 def lib_path @lib_path end |
Class Method Details
.search_igraph(name = nil) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/igraph.rb', line 11 def search_igraph(name = nil) name ||= "libigraph.#{FFI::Platform::LIBSUFFIX}" lib_path = if ENV["IGRAPHDIR"] File.(name, ENV["IGRAPHDIR"]) else File.("../vendor/#{name}", __dir__) end return lib_path if File.exist?(lib_path) begin require "pkg-config" lib_dir = PKGConfig.variable("igraph", "libdir") lib_path = File.(name, lib_dir) rescue PackageConfig::NotFoundError warn "igraph.pc was not found in the pkg-config search path." end return lib_path if File.exist?(lib_path) warn "igraph shared library '#{name}' not found." end |
.search_igraph_windows ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/igraph.rb', line 32 def search_igraph_windows ENV["IGRAPHDIR"] ||= [ RubyInstaller::Runtime.msys2_installation.msys_path, RubyInstaller::Runtime.msys2_installation.mingwarch ].join(File::ALT_SEPARATOR) path = File.("bin/libigraph.dll", ENV["IGRAPHDIR"]) RubyInstaller::Runtime.add_dll_directory(File.dirname(path)) path end |