Fri May 26 09:27:00 UTC 2023 inscode

上级 39fed091
// 假设你已有了邻接矩阵 adjacencyMatrix
// 定义一个二维数组 edges 用来表示各个元素之间的关系(有关系的就标记为 1,否则为 0)
const edges = [];
for (let i = 0; i < adjacencyMatrix.length; i++) {
edges[i] = [];
for (let j = 0; j < adjacencyMatrix[i].length; j++) {
edges[i][j] = adjacencyMatrix[i][j] === 0 ? 0 : 1;
}
}
console.log(edges); // 输出 edges 数组来检查结果
export const apiKey = process.env.INSCODE_API_KEY;
export const apiUrl = 'https://inscode-api.csdn.net/api/v1/gpt/';
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册