Conversation
Test comit. Aadded a short description of the future module in ToolButtonList.prototype.help
eakarpov
left a comment
There was a problem hiding this comment.
Обнови сразу зависимость ядра до 1.0.12 и поменяй импорты:
TaskTemplate -> Template
TaskToolbar -> Toolbar
|
npm v graphlabs.core.template Насчёт TaskTemplate -> Template |
Исправила Замечания по синтаксису. Пыталась подключить для поиска циклов функцию dfs - но это не так просто. Пока оставлю так.
Удалила отладочные строки. Переименовала, чтобы было без "_". Добавила RadioButton - пока толком не работают ((.
Перенесла всё в класс BetaGraph. Добавила разбиение Графа в случае наличия моста.
…absSuite/Tasks.Planarity into AnastasiiaRazheva-patch-1
Я перенесла проверку планарности в componentDidMount
src/Segment.tsx
Outdated
|
|
||
| export class Segment { | ||
|
|
||
| bodyEdges: IEdgeView[] = []; |
There was a problem hiding this comment.
где модификаторы доступа все? непонятно, что можно использовать что нет снаружи
src/BetaGraph.tsx
Outdated
| this.findSegments(); | ||
| } | ||
|
|
||
| if (this.segments.length == 0){ |
src/BetaGraph.tsx
Outdated
|
|
||
| this.vertices = this.vertices.filter((v: IVertexView) => this.edges.find((e: IEdgeView) => e.vertexOne == v.name || e.vertexTwo == v.name )); | ||
|
|
||
| var numVerticesDeleted: number = 0; |
src/BetaGraph.tsx
Outdated
|
|
||
| this.edges = this.edges.filter((e: IEdgeView) => this.vertices.find((v: IVertexView) => v.name === e.vertexOne ) && this.vertices.find((v: IVertexView) => v.name === e.vertexTwo )); | ||
|
|
||
| } while(numVerticesDeleted != 0); |
src/BetaGraph.tsx
Outdated
| this.edges.filter(nonUsedEdge => !this.usedEdges.find(e => e == nonUsedEdge)).forEach(nonUsedEdge => { | ||
| if (this.usedVertices.find(v => nonUsedEdge.vertexOne == v.name) && this.usedVertices.find(v => nonUsedEdge.vertexTwo == v.name)){ | ||
| this.segments.push(new Segment([nonUsedEdge], | ||
| [this.vertices.find(v => v.name == nonUsedEdge.vertexOne), |
There was a problem hiding this comment.
может сделать просто filter чем четыре раза проходиться по массиву?
src/BetaGraph.tsx
Outdated
| } else | ||
| { | ||
| resultCycle.vertices = resultCycle.vertices.concat([this.vertices.find((v: IVertexView) => v.name === nextEdge.vertexOne)]); | ||
| colored = colored.concat([this.vertices.find((v: IVertexView) => v.name === nextEdge.vertexOne)]); |
src/BetaGraph.tsx
Outdated
| this.usedVertices = this.usedVertices.concat(minValueSegment.bodyVertices.slice(1, minValueSegment.bodyVertices.length - 1)); | ||
| this.usedEdges = this.usedEdges.concat(minValueSegment.bodyEdges.slice()); | ||
|
|
||
| var newVertices1 : IVertexView[]; |
There was a problem hiding this comment.
let variable: Type;
и что за newVertices1? Какой подход к нумерации? Комментарии или переименовать.
src/BetaGraph.tsx
Outdated
|
|
||
| this.findSegments(); | ||
|
|
||
| var counter = 0; |
src/BetaGraph.tsx
Outdated
|
|
||
| var counter = 0; | ||
|
|
||
| while (this.segments.length != 0 && !this.segments.find(s => s.value == 0) && counter < 100){ |
| var resultSegment: Segment = new Segment([], [startPoint], startPoint, null); | ||
| let blackList: IEdgeView[] = []; | ||
|
|
||
| let nameOfBlockedVertex: string = null; |
There was a problem hiding this comment.
предполагаю что тип string|null
Код для будущего оценивания ответов студентов. В рамках летней практики.
Обновила шаблон и запилила логи
Обновила template до 1.0.32 Добавила graphlabs.core.graphs
…absSuite/Tasks.Planarity into AnastasiiaRazheva-patch-1
Test comit.
Aadded a short description of the future module in ToolButtonList.prototype.help