-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
316 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,57 @@ | ||
%global __brp_check_rpaths %{nil} | ||
%global __requires_exclude ^libmpi | ||
%global packname Jaya | ||
%global packver 0.1.9 | ||
%global packver 1.0.3 | ||
%global rlibdir /usr/local/lib/R/library | ||
|
||
Name: R-CRAN-%{packname} | ||
Version: 0.1.9 | ||
Release: 3%{?dist}%{?buildtag} | ||
Summary: Jaya, a Gradient-Free Optimization Algorithm | ||
Version: 1.0.3 | ||
Release: 1%{?dist}%{?buildtag} | ||
Summary: Gradient-Free Optimization Algorithm for Single and Multi-Objective Problems | ||
|
||
License: GPL (>= 2) | ||
License: MIT + file LICENSE | ||
URL: https://cran.r-project.org/package=%{packname} | ||
Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz | ||
|
||
|
||
BuildRequires: R-devel | ||
Requires: R-core | ||
BuildRequires: R-devel >= 3.5.0 | ||
Requires: R-core >= 3.5.0 | ||
BuildArch: noarch | ||
BuildRequires: R-CRAN-GA | ||
Requires: R-CRAN-GA | ||
BuildRequires: R-parallel | ||
Requires: R-parallel | ||
|
||
%description | ||
Maximization or Minimization of a fitness function using Jaya Algorithm | ||
(JA). A population based method which repeatedly modifies a population of | ||
individual solutions. Capable of solving both constrained and | ||
unconstrained optimization problems. It does not contain any | ||
hyperparameters. For further details: R.V. Rao (2016) | ||
<doi:10.5267/j.ijiec.2015.8.004> . | ||
An implementation of the Jaya optimization algorithm for both | ||
single-objective and multi-objective problems. Jaya is a population-based, | ||
gradient-free optimization algorithm capable of solving constrained and | ||
unconstrained optimization problems without hyperparameters. This package | ||
includes features such as multi-objective Pareto optimization, adaptive | ||
population adjustment, and early stopping. For further details, see R.V. | ||
Rao (2016) <doi:10.5267/j.ijiec.2015.8.004>. | ||
|
||
%prep | ||
%setup -q -c -n %{packname} | ||
|
||
# fix end of executable files | ||
find -type f -executable -exec grep -Iq . {} \; -exec sed -i -e '$a\' {} \; | ||
# prevent binary stripping | ||
[ -d %{packname}/src ] && find %{packname}/src -type f -exec \ | ||
sed -i 's@/usr/bin/strip@/usr/bin/true@g' {} \; || true | ||
[ -d %{packname}/src ] && find %{packname}/src/Make* -type f -exec \ | ||
sed -i 's@-g0@@g' {} \; || true | ||
# don't allow local prefix in executable scripts | ||
find -type f -executable -exec sed -Ei 's@#!( )*/usr/local/bin@#!/usr/bin@g' {} \; | ||
|
||
%build | ||
|
||
%install | ||
|
||
mkdir -p %{buildroot}%{rlibdir} | ||
%{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname} | ||
|
||
test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so) | ||
rm -f %{buildroot}%{rlibdir}/R.css | ||
# remove buildroot from installed files | ||
find %{buildroot}%{rlibdir} -type f -exec sed -i "s@%{buildroot}@@g" {} \; | ||
|
||
%files | ||
%{rlibdir}/%{packname} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.