| 1234567891011121314151617181920212223242526272829303132 |
- <template>
- <div>
- <gradient-descent :ground-function="groundFunction" :domain="domain" :range="range" />
- </div>
- </template>
- <script lang="ts">
- import Vue from 'vue'
- import GradientDescent from '~/components/playground/gradient-descent/Index.vue'
- const defaultGroundFunction = {
- f: (x: number) => x * x,
- df: (x: number) => x * 2.0
- }
- export default Vue.extend({
- components: {
- GradientDescent
- },
- data() {
- return {
- groundFunction: defaultGroundFunction,
- domain: [0, 2.0],
- range: [0, 4.0]
- }
- }
- })
- </script>
- <style scoped>
- </style>
|