| |
| window.MathJax = { |
| tex: { |
| inlineMath: [['$', '$'], ['\\(', '\\)']] |
| }, |
| options: { |
| skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre'] |
| } |
| }; |
|
|
| |
| document.addEventListener('DOMContentLoaded', function() { |
| |
| document.querySelectorAll('algorithm-card').forEach(card => { |
| card.addEventListener('click', function() { |
| const href = this.getAttribute('href'); |
| if (href) { |
| window.location.href = href; |
| } |
| }); |
| }); |
|
|
| |
| const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); |
| tooltipTriggerList.map(function (tooltipTriggerEl) { |
| return new bootstrap.Tooltip(tooltipTriggerEl); |
| }); |
| }); |
| |
| function createInteractiveGraph(canvasId, config, interactiveOptions = {}) { |
| const ctx = document.getElementById(canvasId).getContext('2d'); |
| const chart = new Chart(ctx, config); |
|
|
| |
| if (interactiveOptions.draggablePoints) { |
| makePointsDraggable(chart); |
| } |
|
|
| return chart; |
| } |
|
|
| function makePointsDraggable(chart) { |
| |
| |
| } |
|
|
| |
| function setupAlgorithmTabs() { |
| const tabs = document.querySelectorAll('.tab'); |
| if (tabs.length > 0) { |
| tabs.forEach(tab => { |
| tab.addEventListener('click', () => { |
| |
| document.querySelectorAll('.tab').forEach(t => t.classList.remove('active')); |
| document.querySelectorAll('.tab-content').forEach(c => c.classList.add('hidden')); |
| |
| |
| tab.classList.add('active'); |
| const tabId = tab.getAttribute('data-tab'); |
| document.getElementById(tabId).classList.remove('hidden'); |
| }); |
| }); |
| } |
| } |
|
|
| |
| document.addEventListener('DOMContentLoaded', function() { |
| setupAlgorithmTabs(); |
| |
| |
| document.querySelectorAll('algorithm-card').forEach(card => { |
| card.addEventListener('click', function() { |
| const href = this.getAttribute('href'); |
| if (href) { |
| window.location.href = href; |
| } |
| }); |
| }); |
| }); |
|
|