Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pythonからのインターフェイスです。 #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ksugahar
Copy link

py::class_<MatSolversICCG>(m, "MatSolversICCG")
	.def(py::init<>())
	.def("solveICCGPy", [](int size, const double conv_cri, const int max_ite, const double accera, const SparseMat& A, const py::array_t<double>& b, py::array_t<double>& x, bool is_log, bool is_save_best, bool is_diag_scale, int DivergeType, double BadDivVal, int BadDivCount){
		MatSolversICCG iccg;
		iccg.setSaveLog(is_log);
		iccg.setSaveBest(is_save_best);
		iccg.setDiagScale(is_diag_scale);
		iccg.setDivergeType(DivergeType);
		iccg.setBadDivVal(BadDivVal);
		iccg.setBadDivCount(BadDivCount);
		bool bl = iccg.solveICCG( size, conv_cri, max_ite, accera, A, b.data(), const_cast<double*>(x.data()) );
		std::vector<double> log;
		iccg.getResidualLog(log);
		return log;
	})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant