2015-10-30 6 views
5
  1. मैं जबकि एक बल निर्देशित लेआउट पैदा करने का उपयोग कर कैसे बढ़त वजन (दो बातचीत प्रोटीन के बीच बातचीत का उदाहरण शक्ति) का उपयोग करने के लिए सबसे अच्छा यकीन नहीं है Cytoscape.js में CoSE प्लगइन। क्या कोई कोई पॉइंटर्स प्रदान कर सकता है। क्या यह "आदर्श एजेंथेंथ" या "एजएलास्टिकिटी" होना चाहिए?cytoscape.js में बल निर्देशित लेआउट के लिए बढ़त वजन का उपयोग करना (COSE)

  2. (संपादित) के बाद क्या मैं वर्तमान में (ए) और क्या मैं (बी) प्राप्त करने के लिए कोशिश कर रहा हूँ मिल दिखा एक आंकड़ा है। लेआउट उत्पन्न करने के लिए मैंने उपयोग किए गए पैरामीटर भी नीचे दिए गए हैं।

धन्यवाद, दत्ता।

पुनश्च:Click to view एक आंकड़ा वर्तमान (लेबल 'ए') और उम्मीद (लेबल "बी") लेआउट दिखा। "ए" के लिए लेआउट विकल्प निम्नलिखित हैं।

var options = { 
     name: 'cose', 
     // Called on `layoutready` 
     ready: function() { }, 
     // Called on `layoutstop` 
     stop: function() { }, 
     // Whether to animate while running the layout 
     animate: true, 
     // Number of iterations between consecutive screen positions update (0 -> only updated on the end) 
     refresh: 20, 
     // Whether to fit the network view after when done 
     fit: true, 
     // Padding on fit 
     padding: 30, 
     // Constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } 
     boundingBox: undefined, 
     componentSpacing: 100, 
     // Whether to randomize node positions on the beginning 
     randomize: true, 
     // Whether to use the JS console to print debug messages 
     debug: false, 
     // Node repulsion (non overlapping) multiplier 
     nodeRepulsion: 400000, 
     // Node repulsion (overlapping) multiplier 
     nodeOverlap: 10, 
     // Ideal edge (non nested) length 
     idealEdgeLength: 10, 
     // Divisor to compute edge forces 
     edgeElasticity: 100, 
     // Nesting factor (multiplier) to compute ideal edge length for nested edges 
     nestingFactor: 5, 
     // Gravity force (constant) 
     gravity: 80, 
     // Maximum number of iterations to perform 
     numIter: 10000, 
     // Initial temperature (maximum node displacement) 
     initialTemp: 100, 
     // Cooling factor (how the temperature is reduced between consecutive iterations 
     coolingFactor: 0.95, 
     // Lower temperature threshold (below this point the layout will end) 
     minTemp: 1.0 
    }; 

उत्तर

0

आदर्श बढ़त लंबाई एक डिफ़ॉल्ट की तरह मान निर्दिष्ट करता है, जबकि लोच बलों है कि अंतिम लंबाई निर्धारित से एक निर्दिष्ट करता है। भौतिकी सिमुलेशन लेआउट के लिए सामान्य रूप से, आपको विभिन्न मानों के साथ प्रयोग करने और अपने विशिष्ट ग्राफ के परिणामों का मूल्यांकन करने की आवश्यकता होगी।

+0

धन्यवाद, मैक्स। मैंने सवाल में एक संपादन जोड़ा। यह बहुत मददगार होगा यदि आप कोस लेआउट के साथ-साथ जो कुछ भी याद आ रहा है उस पर कुछ इनपुट प्रदान कर सकता है। –

+0

आपको भौतिकी लेआउट में क्लस्टरिंग नहीं मिलेगी जब तक कि यह ग्राफ की संरचना के निहित न हो। आप विशेष उपग्राफों पर कोयस के अलग-अलग उदाहरण चलाने का प्रयास कर सकते हैं। – maxkfranz

2

आप कुछ प्रमुख COSE लेआउट सेटिंग्स के लिए स्थिर संख्या के बजाय कार्यों निर्दिष्ट कर सकते हैं। फ़ंक्शंस किनारों (या नोड्स, कुछ मामलों में) लेते हैं, ताकि आप एज गुणों के आधार पर लेआउट को तैयार कर सकें।

तो तुम कुछ इस तरह कर सकता है:

 idealEdgeLength: function (edge) { 
     // Default is: 10 
     // Instead, base it on "weight" 
     return edge.data().weight * .5 
     }, 

     edgeElasticity: function (edge) { 
     // Default is: 100 
     // Instead, base it on "weight" 
     return edge.data().weight * 4 
     }, 

आप पर्वतमाला कि लेआउट इंजन और वजन आप इनपुट के रूप में की उम्मीद कर रहे की सीमा के साथ काम के साथ प्रयोग करना होगा, लेकिन उस दृष्टिकोण AOK काम करना चाहिए ।

संबंधित मुद्दे