Skip to main content

This package is to print and plot Golden Section Algorithm

Project description

Installation and Usage on Github Pages

See Documentation

Requirements

 python >= 3.6

Dependencies

 numpy
 matplotlib
 IPython
 time

Installation

Run the following to install:

pip install GoldenSectionSearch

Usage

 from GoldenSectionSearch import GoldenSectionAlg

 search = GoldenSectionAlg() 

Get solution of Golden Section Search

 x=np.linspace(0,6,100)
 gss = GoldenSectionAlg(x)
 gss.golden_search(0,6,'max',0.05)

Output:

Iteration:  1
Error: 100.0
Iteration:  2
Error: 99.99999999999999
Iteration:  3
Error: 30.901699437494738
Iteration:  4
Error: 27.639320225002106
Iteration:  5
Error: 13.383054136359812
Iteration:  6
Error: 7.868932583326327
.
.
.
.

Above All Points will have graphs according to input

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

GoldenSectionSearch-0.0.6.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

GoldenSectionSearch-0.0.6-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file GoldenSectionSearch-0.0.6.tar.gz.

File metadata

  • Download URL: GoldenSectionSearch-0.0.6.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for GoldenSectionSearch-0.0.6.tar.gz
Algorithm Hash digest
SHA256 0a5b2057ddf2bd99ef3f0ef9227a731fa2d8bb1475dc0f94009493b5d4ead5b6
MD5 76d92118547120b1f83413ffa366f0d1
BLAKE2b-256 3979cc3188042034e05a74a0dee08bedb3168fec5c8266b1c925df9f38c90ece

See more details on using hashes here.

File details

Details for the file GoldenSectionSearch-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for GoldenSectionSearch-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8ac66955f2bc110ea89c212ef668d2408f616e2069bd9fa616344915f1fb4b58
MD5 aff1dfa3315b85d2d4ab6f5c52e3f39c
BLAKE2b-256 752f41c5d41c01d06d52a427e0133f4e0854bdc713fe2f61f1ed088f850d076c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page